| Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
This big ol' change does three high-level things:
1. It modifies `_get_interested_in` to ask the loaded PresenceRouter if
there are any users - in addition to those that share a room with the
user in question - that it thinks should have their presence status
queried. PresenceRouter can either return a Set of users, or "ALL".
2. It modifies `get_new_events` (which is mainly run when a user is
syncing and needs to check for presence updates) to support receiving
"ALL" from `_get_interested_in`. What happens then depends on whether a
`from_key` was provided to `get_new_events`. We also now call
`get_users_and_states` to filter the UserPresenceState objects after
querying ALL of them from a given `from_key`.
3. It also modifies `get_new_events` to take into account whether the
syncing user is included in
`ModuleApi.send_full_presence_to_local_users`. If so, then we're going
to send them all current user presence state (filtering it through
`get_users_for_states` again). We then remove the user ID from the set
to ensure the same doesn't happen on the next sync.
This is mainly all to support redirecting presence for local users as
they sync, though the same method is called for appservice users.
|
|
This will be useful for when PresenceRouter.get_interested_user returns
"ALL". It allows for querying all current local user presencee. Note
that the `presence_stream` table is culled frequently, and doesn't just
grow forever like other stream tables.
|
|
Essentially does the same as the existing keyvalues option, but excludes rows
with the given column and value.
|
|