Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recommendations for mobile clients #1915

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions content/appendices.md
Original file line number Diff line number Diff line change
Expand Up @@ -1363,3 +1363,12 @@ following conventions.
the tokens returned by `next_batch` and `prev_batch` should contain enough
information for subsequent calls to the API to know which page of results
they should return.

## Best Current Practice for Mobile Clients

In order to save bandwidth and battery mobile clients should:

- Use [push notifications][/client-server-api##push-notifications] to get notified about new events
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Use [push notifications][/client-server-api##push-notifications] to get notified about new events
- Use [push notifications][/client-server-api#push-notifications] to get notified about new events

- Disable continuous `/sync` calls
- Fetch the events indicted in the push notifications via the ``GET /rooms/{roomId}/event/{eventId}`` API call
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Fetch the events indicted in the push notifications via the ``GET /rooms/{roomId}/event/{eventId}`` API call
- Fetch the events included in the push notifications via the ``GET /rooms/{roomId}/event/{eventId}`` API call

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, could you linkify GET /rooms/{roomId}/event/{eventId}? Likewise with /sync?

- In case the event is encrypted and the necessary keys aren't present, invoke `/sync` to get the needed encryption keys