mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 17:56:04 -04:00
Remove users from the remote_offline_serials list (and clean up empty elements) when they go online again
This commit is contained in:
parent
b3bda8a75f
commit
e1e5e53127
2 changed files with 38 additions and 1 deletions
|
@ -916,6 +916,33 @@ class PresencePushTestCase(MockedDatastorePresenceTestCase):
|
|||
]
|
||||
)
|
||||
|
||||
yield self.mock_federation_resource.trigger("PUT",
|
||||
"/_matrix/federation/v1/send/1000001/",
|
||||
_make_edu_json("elsewhere", "m.presence",
|
||||
content={
|
||||
"push": [
|
||||
{"user_id": "@potato:remote",
|
||||
"presence": "online"},
|
||||
],
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
self.assertEquals(self.event_source.get_current_key(), 2)
|
||||
|
||||
(events, _) = yield self.event_source.get_new_events_for_user(
|
||||
self.u_apple, 0, None
|
||||
)
|
||||
self.assertEquals(events,
|
||||
[
|
||||
{"type": "m.presence",
|
||||
"content": {
|
||||
"user_id": "@potato:remote",
|
||||
"presence": ONLINE,
|
||||
}}
|
||||
]
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def test_join_room_local(self):
|
||||
self.room_members = [self.u_apple, self.u_banana]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue