Apply suggestions from code review

Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
justjanne/messages-endpoint-threads-filter
Janne Mareike Koschinski 2 years ago committed by GitHub
parent 747daf1539
commit 8d607ca5b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save