@@ -1999,7 +1999,7 @@ This specification describes the following relationship types:
1999
1999
* [ Threads] ( #threading ) .
2000
2000
* [ References] ( #reference-relations )
2001
2001
2002
- #### Aggregations
2002
+ #### Aggregations of child events
2003
2003
2004
2004
{{% added-in v="1.3" %}}
2005
2005
@@ -2013,14 +2013,12 @@ of times that `key` was used by child events.
2013
2013
2014
2014
The actual aggregation format depends on the ` rel_type ` .
2015
2015
2016
- Aggregations are sometimes automatically included by a server alongside the parent
2017
- event. This is known as a "bundled aggregation" or "bundle" for simplicity. The
2018
- act of doing this is "bundling".
2019
-
2020
- When an event is served to the client through the APIs listed below, a ` m.relations ` property
2021
- is included under ` unsigned ` if the event has child events which can be aggregated and point
2022
- at it. The ` m.relations ` property is an object keyed by ` rel_type ` and value being the type-specific
2023
- aggregated format for that ` rel_type ` , also known as the bundle.
2016
+ When an event is served to the client through the APIs listed below, a
2017
+ ` m.relations ` property is included under ` unsigned ` if the event has child
2018
+ events which can be aggregated and point at it. The ` m.relations ` property is
2019
+ an object keyed by ` rel_type ` and value being the type-specific aggregated
2020
+ format for that ` rel_type ` . This ` m.relations ` property is known as a "bundled
2021
+ aggregation".
2024
2022
2025
2023
For example (unimportant fields not included):
2026
2024
@@ -2056,10 +2054,10 @@ For example (unimportant fields not included):
2056
2054
}
2057
2055
```
2058
2056
2059
- Note how the ` org.example.possible_annotations ` bundle is an array compared to the
2060
- ` org.example.possible_thread ` bundle where the server is summarising the state of
2061
- the relationship in a single object. Both are valid ways to aggregate, and their
2062
- exact types depend on the ` rel_type ` .
2057
+ Note how the ` org.example.possible_annotations ` aggregation is an array, while in the
2058
+ ` org.example.possible_thread ` aggregation where the server is summarising the state of
2059
+ the relationship in a single object. Both are valid ways to aggregate: the format of an
2060
+ aggregation depends on the ` rel_type ` .
2063
2061
2064
2062
{{% boxes/warning %}}
2065
2063
State events do not currently receive bundled aggregations. This is not
@@ -2086,11 +2084,11 @@ such as `/initialSync`.
2086
2084
2087
2085
While this functionality allows the client to see what was known to the server at the
2088
2086
time of handling, the client should continue to aggregate locally if it is aware of
2089
- the relationship type's behaviour. For example, a client might increment a ` count `
2090
- on a parent event's bundle if it saw a new child event which referenced that parent.
2087
+ the relationship type's behaviour. For example, a client might internally increment a ` count `
2088
+ in a parent event's aggregation data if it saw a new child event which referenced that parent.
2091
2089
2092
- The bundle provided by the server only includes child events which were known at the
2093
- time the client would receive the bundle . For example, in a single ` /sync ` response
2090
+ The aggregation provided by the server only includes child events which were known at the
2091
+ time the client would receive the aggregation . For example, in a single ` /sync ` response
2094
2092
with the parent and multiple child events the child events would have already been
2095
2093
included on the parent's ` m.relations ` field. Events received in future syncs would
2096
2094
need to be aggregated manually by the client.
@@ -2100,7 +2098,7 @@ Events from [ignored users](#ignoring-users) do not appear in the aggregation
2100
2098
from the server, however clients might still have events from ignored users cached. Like
2101
2099
with normal events, clients will need to de-aggregate child events sent by ignored users to
2102
2100
avoid them being considered in counts. Servers must additionally ensure they do not
2103
- consider child events from ignored users when preparing a bundle for the client.
2101
+ consider child events from ignored users when preparing an aggregation for the client.
2104
2102
{{% /boxes/note %}}
2105
2103
2106
2104
When a parent event is redacted, the child events which pointed to that parent remain, however
@@ -2109,7 +2107,7 @@ to de-aggregate or disassociate the event once the relationship is lost. Clients
2109
2107
aggregation or which handle redactions locally should do the same.
2110
2108
2111
2109
It is suggested that clients perform local echo on aggregations — for instance, aggregating
2112
- a new child event into a bundle optimistically until the server returns a failure or the client
2110
+ a new child event into a parent event optimistically until the server returns a failure or the client
2113
2111
gives up on sending the event, at which point the event should be de-aggregated and an
2114
2112
error or similar shown. The client should be cautious to not aggregate an event twice if
2115
2113
it has already optimistically aggregated the event. Clients are encouraged to take this
@@ -2118,7 +2116,7 @@ likely using the transaction ID as a temporary event ID until a proper event ID
2118
2116
2119
2117
{{% boxes/warning %}}
2120
2118
Due to history visibility restrictions, child events might not be visible to the user
2121
- if they are in a section of history the user cannot see. This means any bundles which would
2119
+ if they are in a section of history the user cannot see. This means any aggregations which would
2122
2120
normally include those events will be lacking them and the client will not be able to
2123
2121
locally aggregate the events either — relating events of importance (such as votes) should
2124
2122
take into consideration history visibility.
0 commit comments