diff --git a/proposals/3874-messages-endpoint-threads-filter.md b/proposals/3874-messages-endpoint-threads-filter.md index 2f88e48d..cf80c90e 100644 --- a/proposals/3874-messages-endpoint-threads-filter.md +++ b/proposals/3874-messages-endpoint-threads-filter.md @@ -16,7 +16,7 @@ this would allow clients significant usability improvements with threads. This proposal recommends extending the existing [Event filters] are extended with new filters, named `not_rel_types` and `rel_types`. If the `rel_types` filter is specified, messages which match any of the given relation types will be returned. If the `not_rel_types` filter is specified, only messages which match none of the given relation types will be -returned. +returned, this includes events without a relation. If a relation type is present in both of these fields, `not_rel_types` takes precedence and messages with this type will not be returned. @@ -36,15 +36,14 @@ formatted for legibility: } ``` -Note that the newly added filtering parameters return events based on information in related events. Consider the -following events in a room: +The newly added filtering parameters return events based on information in the `m.relates_to` field. Consider the following events in a room: * `A`: a `m.room.message` event sent by `alice` * `B`: a `m.room.message` event sent by `bob` * `C`: a `m.room.message` event sent by `charlie` which relates to `A` with type `m.thread` Using a filter of `"not_rel_types": ["m.thread"]` would return only events `A` and `B` as they do not have a relation of -`m.thread` in them. Thread roots are returned in the same way as messages which are not part of threads at all. +`m.thread` in them. ## Potential issues