matrix-org / matrix-spec

The Matrix protocol specification
Apache License 2.0
197 stars 97 forks source link

Add recommendations for mobile clients #1915

Open agx opened 3 months ago

agx commented 3 months ago

This came out of a discussion at https://matrix.to/#/!XXSJTvRPInupfUgQVb:matrix.org/$IUx1flZV7iLWIviEeJWrmIw8LHgv4DhKGDKnO1hU688?via=pixie.town&via=matrix.org&via=element.io

When looking into adding UnifiedPush support to a client I was looking around for RFC style "Best Comon Practice" implementation hints but couldn't find any. Maybe it makes sense to add something to the documentation? I couldn't find a more sensible place than the spec if there is one please point me to it?

Pull Request Checklist

bnjbvr commented 3 months ago

@matrix-org/rust could I confirm whether this is the best practice for mobile developers to receive (non-)encrypted events?

Yep, something like this. For what it's worth, instead of using /context or /event for retrieving the event, we're doing a limited sliding sync, because the two former endpoints don't work for stripped events (coming from invited rooms). And if the event was encrypted, we're indeed trying to run a sliding sync limited to the to-device and encryption extensions; this may change with the new evolution of the sliding sync protocol.