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

First sync response for newly joined room is ignored if it is returned in the ongoing /sync request #15428

Open
bwindels opened this issue Oct 9, 2020 · 3 comments
Labels
A-Room-List A-Timeline O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect

Comments

@bwindels
Copy link
Contributor

bwindels commented Oct 9, 2020

e.g. the sync request started prior to /join request. I can only reproduce the problem when joining #dendrive-dev:matrix (!yjVgJUsMLYLAONsoii:jki.re).

@bwindels
Copy link
Contributor Author

bwindels commented Oct 9, 2020

logs.zip

Added the HAR I recorded while reproducing this. The HAR contains a lot of noise, so I also created a summary with only the non-OPTIONS requests that contain the room name that manifested the problem in the response body. There you can clearly see that the sync response before the /join contains all the state events for the newly joined room, and the /sync that comes after is almost empty.

Element web (app) showed the wrong room name (Github [@brendan:abolivier.bzh] (@_neb_github_=40brendan=3aabolivier.bzh:matrix.org) and 461 others) and inspecting the room state in that room in the devtools showed only member events (which must have been from the /members request).

First I thought this was a synapse bug, but this appears to be valid behaviour.

@turt2live turt2live added T-Task Tasks for the team like planning P1 S-Minor Impairs non-critical functionality or suitable workarounds exist A-Room-List A-Timeline labels Oct 13, 2020
@SimonBrandner SimonBrandner added O-Uncommon Most users are unlikely to come across this or unexpected workflow and removed T-Task Tasks for the team like planning P1 labels Aug 24, 2022
@MadLittleMods
Copy link
Contributor

I wonder if this is related to #8246

@t3chguy
Copy link
Member

t3chguy commented May 9, 2023

Thanks for the HAR @bwindels - tried to reproduce this in a unit test with no luck unfortunately

Index: spec/integ/matrix-client-syncing.spec.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/spec/integ/matrix-client-syncing.spec.ts b/spec/integ/matrix-client-syncing.spec.ts
--- a/spec/integ/matrix-client-syncing.spec.ts	(revision ee2b0204aa4ee09c5d5cfba524f20f4a553d192a)
+++ b/spec/integ/matrix-client-syncing.spec.ts	(date 1683623990826)
@@ -737,9 +737,9 @@
             });
         });
 
-        it.skip("should update power levels for users in a room", () => {});
+        it.todo("should update power levels for users in a room");
 
-        it.skip("should update the room topic", () => {});
+        it.todo("should update the room topic");
 
         describe("onMarkerStateEvent", () => {
             const normalMessageEvent = utils.mkMessage({
@@ -1221,6 +1221,685 @@
                 expect(stateEventEmitCount).toEqual(2);
             });
         });
+
+        it("should handle room coming down sync before /join completes", async () => {
+            client!.startClient();
+            // Initial sync
+            httpBackend!.when("GET", "/sync").respond(200, {
+                rooms: {
+                    join: {},
+                },
+            });
+            await httpBackend!.flushAllExpected();
+
+            const prom = client!.joinRoom("#dendrite-dev:matrix.org");
+            httpBackend!.when("GET", "/sync").respond(200, {
+                rooms: {
+                    join: {
+                        "!yjVgJUsMLYLAONsoii:jki.re": {
+                            "timeline": {
+                                events: [
+                                    {
+                                        content: {
+                                            body: "https://github.com/matrix-org/dendrite/issues/1468 : Move to zap",
+                                            msgtype: "m.notice",
+                                        },
+                                        origin_server_ts: 1602235096886,
+                                        sender: "@_neb_github:matrix.org",
+                                        type: "m.room.message",
+                                        unsigned: { age: 3323714 },
+                                        event_id: "$BUe9QWYKhi2JTA4GTOrDyGVCwGbBMazMlvxMxECOciA",
+                                    },
+                                    {
+                                        content: {
+                                            body: "I'd rather not solve centralised logging issues at the dendrite level, rather do it at the machine level (eg exporting logs to cloudwatch)",
+                                            msgtype: "m.text",
+                                        },
+                                        origin_server_ts: 1602235156961,
+                                        sender: "@kegan:matrix.org",
+                                        type: "m.room.message",
+                                        unsigned: { age: 3263639 },
+                                        event_id: "$w1FEr+YnWVJo1sscMy1iTzdmCbl2Q8bXkGEiNm0/Rf0",
+                                    },
+                                    {
+                                        content: {
+                                            body: "Kegan: Ah, I see. I missed that dendrite only uses one log file when running in monolith mode. \ud83d\udc4c",
+                                            format: "org.matrix.custom.html",
+                                            formatted_body:
+                                                '<a href="https://matrix.to/#/@kegan:matrix.org">Kegan</a>: Ah, I see. I missed that dendrite only uses one log file when running in monolith mode. \ud83d\udc4c',
+                                            msgtype: "m.text",
+                                        },
+                                        origin_server_ts: 1602235274901,
+                                        sender: "@bn4t:matrix.bn4t.me",
+                                        type: "m.room.message",
+                                        unsigned: { age: 3145699 },
+                                        event_id: "$SLF7BP6bVcn/D/+Q/RO3JkBU2JYNFv4jiPzTuapsXhY",
+                                    },
+                                    {
+                                        content: {
+                                            body: "I'd recommend updating the docker hub images to at least 0.1.0",
+                                            msgtype: "m.text",
+                                        },
+                                        origin_server_ts: 1602236234530,
+                                        sender: "@ptman:kapsi.fi",
+                                        type: "m.room.message",
+                                        unsigned: { age: 2186070 },
+                                        event_id: "$3iOd6UnGJ5tVIOa23Il81uK8UrpCh5W9GDsDRK2FCl8",
+                                    },
+                                    {
+                                        content: {
+                                            body: "I tried using them, then switched to self-build 0.1.0, and db migration failed",
+                                            msgtype: "m.text",
+                                        },
+                                        origin_server_ts: 1602236252540,
+                                        sender: "@ptman:kapsi.fi",
+                                        type: "m.room.message",
+                                        unsigned: { age: 2168060 },
+                                        event_id: "$wNt8x/Aq14F4NdwfgbFEGXT8vjHraRkS+EIgSYreJew",
+                                    },
+                                    {
+                                        content: {
+                                            "body": " * I tried using them, then switched to self-built 0.1.0, and db migration failed",
+                                            "m.new_content": {
+                                                body: "I tried using them, then switched to self-built 0.1.0, and db migration failed",
+                                                msgtype: "m.text",
+                                            },
+                                            "m.relates_to": {
+                                                event_id: "$wNt8x/Aq14F4NdwfgbFEGXT8vjHraRkS+EIgSYreJew",
+                                                rel_type: "m.replace",
+                                            },
+                                            "msgtype": "m.text",
+                                        },
+                                        origin_server_ts: 1602236267674,
+                                        sender: "@ptman:kapsi.fi",
+                                        type: "m.room.message",
+                                        unsigned: { age: 2152926 },
+                                        event_id: "$h+VG6hIHYGmVZYf7snq0RrTMOhQkkDOvl/YEVrw5ing",
+                                    },
+                                    {
+                                        content: {
+                                            "body": "> <@ptman:kapsi.fi> I'd recommend updating the docker hub images to at least 0.1.0\n\nThey were updated to 0.1.0 this morning",
+                                            "format": "org.matrix.custom.html",
+                                            "formatted_body":
+                                                '<mx-reply><blockquote><a href="https://matrix.to/#/!yjVgJUsMLYLAONsoii:jki.re/$3iOd6UnGJ5tVIOa23Il81uK8UrpCh5W9GDsDRK2FCl8?via=jki.re&via=matrix.org&via=privacytools.io">In reply to</a> <a href="https://matrix.to/#/@ptman:kapsi.fi">@ptman:kapsi.fi</a><br>I&#39;d recommend updating the docker hub images to at least 0.1.0</blockquote></mx-reply>They were updated to 0.1.0 this morning',
+                                            "m.relates_to": {
+                                                "m.in_reply_to": {
+                                                    event_id: "$3iOd6UnGJ5tVIOa23Il81uK8UrpCh5W9GDsDRK2FCl8",
+                                                },
+                                            },
+                                            "msgtype": "m.text",
+                                        },
+                                        origin_server_ts: 1602236303287,
+                                        sender: "@neilalexander:matrix.org",
+                                        type: "m.room.message",
+                                        unsigned: { age: 2117313 },
+                                        event_id: "$pqSJVmsVuN0nLy480xB9fklHYI1+cOQUhbz6aC38FiA",
+                                    },
+                                    {
+                                        content: { body: "huh", msgtype: "m.text" },
+                                        origin_server_ts: 1602236309756,
+                                        sender: "@ptman:kapsi.fi",
+                                        type: "m.room.message",
+                                        unsigned: { age: 2110844 },
+                                        event_id: "$XbZb/q+rhFMSrKFePOGUoIqPNOFOmJcJmslFZsUgJSY",
+                                    },
+                                    {
+                                        content: { body: "I did it like an hour ago", msgtype: "m.text" },
+                                        origin_server_ts: 1602236317354,
+                                        sender: "@neilalexander:matrix.org",
+                                        type: "m.room.message",
+                                        unsigned: { age: 2103246 },
+                                        event_id: "$cIAoZ604TS8jQIS6zk2FPIG4icikAqvv7+ksaA3iftY",
+                                    },
+                                    {
+                                        content: {
+                                            body: "ah, I must've managed to get them before that",
+                                            msgtype: "m.text",
+                                        },
+                                        origin_server_ts: 1602236338631,
+                                        sender: "@ptman:kapsi.fi",
+                                        type: "m.room.message",
+                                        unsigned: { age: 2081969 },
+                                        event_id: "$uu1egAUzYHoyZlPGy/Y4aAk71daWR7CKy9Eya208qIw",
+                                    },
+                                    {
+                                        content: {
+                                            avatar_url: "mxc://matrix.org/aerWVfICBMcyFcEyREcivLuI",
+                                            displayname: "Bruno",
+                                            membership: "join",
+                                        },
+                                        origin_server_ts: 1602236345268,
+                                        sender: "@bwindels:matrix.org",
+                                        state_key: "@bwindels:matrix.org",
+                                        type: "m.room.member",
+                                        unsigned: { age: 2075332 },
+                                        event_id: "$JgxgM1aaoqOI/u/bBZ6o7aJonRFycp3KgLFN5zfmCwM",
+                                    },
+                                    {
+                                        content: { body: "37 minutes ago now that I took a look", msgtype: "m.text" },
+                                        origin_server_ts: 1602236349280,
+                                        sender: "@ptman:kapsi.fi",
+                                        type: "m.room.message",
+                                        unsigned: { age: 2071320 },
+                                        event_id: "$WcYffQ7shsg/DJTFL186VrWUPJlG1gr1TfmXntnFJOI",
+                                    },
+                                    {
+                                        content: { body: "thanks =9", msgtype: "m.text" },
+                                        origin_server_ts: 1602236352065,
+                                        sender: "@ptman:kapsi.fi",
+                                        type: "m.room.message",
+                                        unsigned: { age: 2068535 },
+                                        event_id: "$8h3rOCpEWXmEP4opYguHqDv5c0gD421sBGEG2knWlrk",
+                                    },
+                                    {
+                                        content: {
+                                            "body": " * thanks =)",
+                                            "m.new_content": { body: "thanks =)", msgtype: "m.text" },
+                                            "m.relates_to": {
+                                                event_id: "$8h3rOCpEWXmEP4opYguHqDv5c0gD421sBGEG2knWlrk",
+                                                rel_type: "m.replace",
+                                            },
+                                            "msgtype": "m.text",
+                                        },
+                                        origin_server_ts: 1602236358802,
+                                        sender: "@ptman:kapsi.fi",
+                                        type: "m.room.message",
+                                        unsigned: { age: 2061798 },
+                                        event_id: "$AgtpMOcSsZRO4GEz603Vikpfh/bFK9JjI9+hBN9HulA",
+                                    },
+                                    {
+                                        content: {
+                                            "m.relates_to": {
+                                                event_id: "$pqSJVmsVuN0nLy480xB9fklHYI1+cOQUhbz6aC38FiA",
+                                                key: "\ud83c\udf89",
+                                                rel_type: "m.annotation",
+                                            },
+                                        },
+                                        origin_server_ts: 1602236376387,
+                                        sender: "@ptman:kapsi.fi",
+                                        type: "m.reaction",
+                                        unsigned: { age: 2044213 },
+                                        event_id: "$ARJPSHj6NUYqQGWE0/xK3Kkvu0czpcVNB7McL8vE73s",
+                                    },
+                                    {
+                                        content: { membership: "leave" },
+                                        origin_server_ts: 1602236615682,
+                                        sender: "@bwindels:matrix.org",
+                                        state_key: "@bwindels:matrix.org",
+                                        type: "m.room.member",
+                                        unsigned: {
+                                            replaces_state: "$JgxgM1aaoqOI/u/bBZ6o7aJonRFycp3KgLFN5zfmCwM",
+                                            prev_content: {
+                                                avatar_url: "mxc://matrix.org/aerWVfICBMcyFcEyREcivLuI",
+                                                displayname: "Bruno",
+                                                membership: "join",
+                                            },
+                                            prev_sender: "@bwindels:matrix.org",
+                                            age: 1804918,
+                                        },
+                                        event_id: "$23ksT9EJsx2RIv4dS1qrbU2CRL/YqjPEdTtEQ/NjU0g",
+                                    },
+                                    {
+                                        content: {
+                                            avatar_url: "mxc://matrix.org/aerWVfICBMcyFcEyREcivLuI",
+                                            displayname: "Bruno",
+                                            membership: "join",
+                                        },
+                                        origin_server_ts: 1602236630007,
+                                        sender: "@bwindels:matrix.org",
+                                        state_key: "@bwindels:matrix.org",
+                                        type: "m.room.member",
+                                        unsigned: {
+                                            replaces_state: "$23ksT9EJsx2RIv4dS1qrbU2CRL/YqjPEdTtEQ/NjU0g",
+                                            prev_content: { membership: "leave" },
+                                            prev_sender: "@bwindels:matrix.org",
+                                            age: 1790593,
+                                        },
+                                        event_id: "$BbCjdoXOk9cKAcss2I1vPSj6TF6Azvcjq3MboawJyV4",
+                                    },
+                                    {
+                                        content: { avatar_url: "", displayname: "neilalexander", membership: "join" },
+                                        origin_server_ts: 1602238332203,
+                                        sender: "@neilalexander:dendrite.neilalexander.dev",
+                                        state_key: "@neilalexander:dendrite.neilalexander.dev",
+                                        type: "m.room.member",
+                                        unsigned: {
+                                            replaces_state: "$hWnz9RJeDA+S5G00Po0gn1qn56ZjGSfb1sVwLz+SoXc",
+                                            prev_content: {
+                                                avatar_url:
+                                                    "mxc://dendrite.neilalexander.dev/cfa3de712d3a410eb901465ee721bd674a348309a49204017908dc813baea1e0",
+                                                displayname: "neilalexander",
+                                                membership: "join",
+                                            },
+                                            prev_sender: "@neilalexander:dendrite.neilalexander.dev",
+                                        },
+                                        event_id: "$e2qUaiSU4i3DZZNe7mAVcJeciUAcAGNYbgeUozPf51A",
+                                    },
+                                    {
+                                        content: {
+                                            avatar_url: "mxc://matrix.org/AbaQoXqdDHmFzEpEIYBXSTEP",
+                                            displayname: "Bruno the bloodhound",
+                                            membership: "join",
+                                        },
+                                        origin_server_ts: 1602238420007,
+                                        sender: "@bruno4:matrix.org",
+                                        state_key: "@bruno4:matrix.org",
+                                        type: "m.room.member",
+                                        unsigned: { age: 593 },
+                                        event_id: "$pwrUW6w4vOqNpm/WgD/yLH4HP3oCPuxs2fp66lu/8b8",
+                                    },
+                                    {
+                                        content: {
+                                            avatar_url: "mxc://matrix.org/AbaQoXqdDHmFzEpEIYBXSTEP",
+                                            displayname: "Bruno the bloodhound",
+                                            membership: "join",
+                                        },
+                                        origin_server_ts: 1602238420007,
+                                        sender: "@bruno4:matrix.org",
+                                        state_key: "@bruno4:matrix.org",
+                                        type: "m.room.member",
+                                        unsigned: { age: 593 },
+                                        event_id: "$pwrUW6w4vOqNpm/WgD/yLH4HP3oCPuxs2fp66lu/8b8",
+                                    },
+                                ],
+                                prev_batch:
+                                    "t17438-1586726213_757284957_11414391_609416111_443968890_1582662_105626749_367612286_134555",
+                                limited: true,
+                            },
+                            "state": {
+                                events: [
+                                    {
+                                        content: {},
+                                        origin_server_ts: 1599756212074,
+                                        sender: "@kegan:matrix.org",
+                                        state_key: "etherpad_%40andrewm%3Aamorgan.xyz_1565110370630",
+                                        type: "im.vector.modular.widgets",
+                                        unsigned: {
+                                            replaces_state: "$NJ/2RJY5OS52r/yZNn423jhWV2tOmI2cVpWc8xcBMNk",
+                                            age: 2482208526,
+                                        },
+                                        event_id: "$636W9/66j9jDcF7fXEtzts0YrhCFiVcoijuJyNpSndE",
+                                    },
+                                    {
+                                        type: "m.room.guest_access",
+                                        sender: "@erikj:jki.re",
+                                        content: { guest_access: "can_join" },
+                                        state_key: "",
+                                        origin_server_ts: 1552315464691,
+                                        unsigned: { age: 10012 },
+                                        event_id: "$DC12bS9xWNkGx9ceH3/S7sEwrzly9ZQ8N7AWuDraIEo",
+                                    },
+                                    {
+                                        type: "m.room.create",
+                                        sender: "@erikj:jki.re",
+                                        content: {
+                                            room_version: "3",
+                                            predecessor: {
+                                                room_id: "!FyQrGcOoVamcLcvdob:matrix.org",
+                                                event_id: "$1552315464222HLnUN:jki.re",
+                                            },
+                                            creator: "@erikj:jki.re",
+                                        },
+                                        state_key: "",
+                                        origin_server_ts: 1552315464428,
+                                        unsigned: { age: 10275 },
+                                        event_id: "$5jwZKnDj53thkkjnuHGH06X0CXiy7X9B+uHGC97sGeg",
+                                    },
+                                    {
+                                        type: "m.room.history_visibility",
+                                        sender: "@erikj:jki.re",
+                                        content: { history_visibility: "world_readable" },
+                                        state_key: "",
+                                        origin_server_ts: 1552315464804,
+                                        unsigned: { age: 9899 },
+                                        event_id: "$QA5LVWnJNLrBswjCODehnpL/+QeGiRPc9ukNtKl9vZ8",
+                                    },
+                                    {
+                                        content: {
+                                            display_name: "dlo...@min...",
+                                            key_validity_url:
+                                                "https://vector.im/_matrix/identity/api/v1/pubkey/isvalid",
+                                            public_key: "ta8IQ0u1sp44HVpxYi7dFOdS/bfwDjcy4xLFlfY5KOA",
+                                            public_keys: [
+                                                {
+                                                    key_validity_url:
+                                                        "https://vector.im/_matrix/identity/api/v1/pubkey/isvalid",
+                                                    public_key: "ta8IQ0u1sp44HVpxYi7dFOdS/bfwDjcy4xLFlfY5KOA",
+                                                },
+                                                {
+                                                    key_validity_url:
+                                                        "https://vector.im/_matrix/identity/api/v1/pubkey/ephemeral/isvalid",
+                                                    public_key: "fROaFkcWDhpYYd5i5nP38KY6w8RtZybWmlWXyrImC7o",
+                                                },
+                                            ],
+                                        },
+                                        origin_server_ts: 1559309955655,
+                                        sender: "@gqadonis:matrix.org",
+                                        state_key:
+                                            "XoFeLAevimLJYHfxPGqPXGodEJRbBNcBFXlOHnDCwtbSRVPoXMRqGAyrogyjbrnobZPpOAaNQGypChVgPKiCVdIJPuTtujqrdIctXKyYabFXNNUstmnAdgWpzVobMVpp",
+                                        type: "m.room.third_party_invite",
+                                        unsigned: { age: 42928464945 },
+                                        event_id: "$xZrnX2N7Ed9werTfAHSQj5+QJegREApHY77FpzfF7aA",
+                                    },
+                                    {
+                                        content: { alias: "#dendrite-dev:matrix.org" },
+                                        origin_server_ts: 1552315502756,
+                                        sender: "@erikj:matrix.org",
+                                        state_key: "",
+                                        type: "m.room.canonical_alias",
+                                        unsigned: { age: 49922917844 },
+                                        event_id: "$JmdNmHpi8zWaTyueJdx2dCYmh7vD9dENMuJJ1n1X2AA",
+                                    },
+                                    {
+                                        content: {
+                                            ban: 50,
+                                            events: {
+                                                "m.room.avatar": 50,
+                                                "m.room.canonical_alias": 50,
+                                                "m.room.history_visibility": 100,
+                                                "m.room.name": 50,
+                                                "m.room.power_levels": 100,
+                                            },
+                                            events_default: 0,
+                                            invite: 0,
+                                            kick: 50,
+                                            redact: 50,
+                                            state_default: 50,
+                                            users: {
+                                                "@abuse:matrix.org": 50,
+                                                "@andrewm:amorgan.xyz": 50,
+                                                "@brendan:abolivier.bzh": 50,
+                                                "@erikj:jki.re": 100,
+                                                "@erikj:matrix.org": 100,
+                                                "@kegan:matrix.org": 50,
+                                                "@matthew:matrix.org": 100,
+                                                "@neilalexander:matrix.org": 50,
+                                                "@richvdh:matrix.org": 50,
+                                                "@travis:t2l.io": 50,
+                                            },
+                                            users_default: 0,
+                                        },
+                                        origin_server_ts: 1581090489890,
+                                        sender: "@matthew:matrix.org",
+                                        state_key: "",
+                                        type: "m.room.power_levels",
+                                        unsigned: {
+                                            replaces_state: "$7XZsFJq1tEVLC6vXYsbhJatCfSeu1251xCgLxKjUm/s",
+                                            age: 21147930710,
+                                        },
+                                        event_id: "$5KvOJ83oMmOi7liBk9DqR5A1Guago2BQ8hwG0G+celU",
+                                    },
+                                    {
+                                        content: {
+                                            avatar_url: "mxc://matrix.org/BpDaozLwgLnlNStxDxvLzhPr",
+                                            displayname: "neilalexander",
+                                            membership: "join",
+                                        },
+                                        origin_server_ts: 1576504735944,
+                                        sender: "@neilalexander:matrix.org",
+                                        state_key: "@neilalexander:matrix.org",
+                                        type: "m.room.member",
+                                        unsigned: {
+                                            replaces_state: "$1VscoUthto0BacD+dClDosWg5HbLHE1qmMRIwvClwrg",
+                                            age: 25733684656,
+                                        },
+                                        event_id: "$A79YuX05AwX+xRXd9O7gAikEiV2i5wfrMJuKV7PNek8",
+                                    },
+                                    {
+                                        type: "m.room.avatar",
+                                        sender: "@erikj:jki.re",
+                                        content: { url: "mxc://matrix.org/GvRtJWGUdxhajtZPxQbTBeyK" },
+                                        state_key: "",
+                                        origin_server_ts: 1552315464645,
+                                        unsigned: { age: 10058 },
+                                        event_id: "$SE4mfc4RMMiT5AGNOjCW0tAyuCbY2vhSCm+SX1qAZug",
+                                    },
+                                    {
+                                        content: {
+                                            avatar_url: "mxc://matrix.org/WYmFvbiQeezYvwLFCtjIRKkR",
+                                            displayname: "Kegan",
+                                            membership: "join",
+                                        },
+                                        origin_server_ts: 1598524270584,
+                                        sender: "@kegan:matrix.org",
+                                        state_key: "@kegan:matrix.org",
+                                        type: "m.room.member",
+                                        unsigned: {
+                                            replaces_state: "$5rICDeEixjgsO/VrP+MQA6AwFwchORSdnigyJ+vC82w",
+                                            age: 3714150016,
+                                        },
+                                        event_id: "$QUX++3fskeQOUf3igkY7mn639cMubLbkOXOi2A+uhyk",
+                                    },
+                                    {
+                                        content: { groups: ["+matrix:matrix.org", "+community:matrix.org"] },
+                                        origin_server_ts: 1552643601062,
+                                        sender: "@brendan:abolivier.bzh",
+                                        state_key: "",
+                                        type: "m.room.related_groups",
+                                        unsigned: {
+                                            prev_content: { groups: ["+matrix:matrix.org"] },
+                                            prev_sender: "@brendan:abolivier.bzh",
+                                            replaces_state: "$WIWrJjjObk0ubXsbyxWAUDIKIK/bDpoRSJd1p1zkweM",
+                                            age: 49594819538,
+                                        },
+                                        event_id: "$F2XSSlZchxUaNwTgdxHl37oxoDXMv+bMfNglwK6ZwSs",
+                                    },
+                                    {
+                                        content: {
+                                            topic: "dendrite developer discussion - progress: https://github.com/matrix-org/dendrite/milestones | Help out! https://github.com/matrix-org/dendrite/blob/master/docs/CONTRIBUTING.md",
+                                        },
+                                        origin_server_ts: 1599750801409,
+                                        sender: "@neilalexander:matrix.org",
+                                        state_key: "",
+                                        type: "m.room.topic",
+                                        unsigned: {
+                                            replaces_state: "$EiRDL7lk1W+LugdFV+Ev9uf9V3fOUt1oMA8Y8IL+950",
+                                            age: 2487619191,
+                                        },
+                                        event_id: "$x6t69C1/hOueQzmeSEI//JM9WYFnERRppIwOicQ6oao",
+                                    },
+                                    {
+                                        type: "m.room.join_rules",
+                                        sender: "@erikj:jki.re",
+                                        content: { join_rule: "public" },
+                                        state_key: "",
+                                        origin_server_ts: 1552315465504,
+                                        unsigned: { age: 9199 },
+                                        event_id: "$DlIsZcuTUdOKIUE96KB3wPVWl/L9Ug4ZZd/LnxNPRSc",
+                                    },
+                                    {
+                                        content: {
+                                            avatar_url:
+                                                "mxc://dendrite.neilalexander.dev/cfa3de712d3a410eb901465ee721bd674a348309a49204017908dc813baea1e0",
+                                            displayname: "neilalexander",
+                                            membership: "join",
+                                        },
+                                        origin_server_ts: 1602166359932,
+                                        sender: "@neilalexander:dendrite.neilalexander.dev",
+                                        state_key: "@neilalexander:dendrite.neilalexander.dev",
+                                        type: "m.room.member",
+                                        unsigned: { replaces_state: "$FnVxC0umUxbC3LIOK1rMtEawSwc6P1C3wyyv1ZjUDDY" },
+                                        event_id: "$hWnz9RJeDA+S5G00Po0gn1qn56ZjGSfb1sVwLz+SoXc",
+                                    },
+                                    {
+                                        content: {
+                                            avatar_url: "mxc://matrix.org/KfkLMomWWjVZMbgVCKisfFPy",
+                                            displayname: "Github",
+                                            inviter: "@brendan:abolivier.bzh",
+                                            membership: "join",
+                                        },
+                                        origin_server_ts: 1552486436541,
+                                        sender: "@_neb_github:matrix.org",
+                                        state_key: "@_neb_github:matrix.org",
+                                        type: "m.room.member",
+                                        unsigned: {
+                                            replaces_state: "$kf2dcUXqq/fc/nBIlHMNcJk9VSaVvfdXgWEqdE+rhxA",
+                                            age: 49751984059,
+                                        },
+                                        event_id: "$gn2Lz73f2aMzUJi30apkuQZfEy4rNQi8LTnketJvDB4",
+                                    },
+                                    {
+                                        content: {
+                                            allow: ["*"],
+                                            allow_ip_literals: false,
+                                            deny: [
+                                                "calamari.space",
+                                                "*.lindalap.net",
+                                                "*.matrix.thejewsdid911.com",
+                                                ".matrix.thejewsdid911.com",
+                                                "lindalap.net",
+                                                "matrix.thejewsdid911.com",
+                                                "midov.pl",
+                                                "*.200acres.org",
+                                                "*.glowers.club",
+                                                "*.gossip.love",
+                                                "*.matrix.kiwifarms.net",
+                                                "*.nerdsin.space",
+                                                "*.ordoevangelistarum.com",
+                                                "*.zemos.net",
+                                                "200acres.org",
+                                                "ardaxi.com",
+                                                "c-24-11-108-182.hsd1.ut.comcast.net",
+                                                "glowers.club",
+                                                "gossip.love",
+                                                "matrix.kiwifarms.net",
+                                                "nerdsin.space",
+                                                "ordoevangelistarum.com",
+                                                "zemos.net",
+                                            ],
+                                        },
+                                        origin_server_ts: 1593681314247,
+                                        sender: "@abuse:matrix.org",
+                                        state_key: "",
+                                        type: "m.room.server_acl",
+                                        unsigned: {
+                                            replaces_state: "$B39ZZy6PVoPrRMexms3ceUcqAXMrMxAG+bkcY3BHrzU",
+                                            age: 8557106353,
+                                        },
+                                        event_id: "$WYZmhE3v3TANwt+2Tl5X8oHo80DvMD7N5j01kE64RJo",
+                                    },
+                                    {
+                                        content: {
+                                            display_name: "mba...@min...",
+                                            key_validity_url:
+                                                "https://vector.im/_matrix/identity/api/v1/pubkey/isvalid",
+                                            public_key: "ta8IQ0u1sp44HVpxYi7dFOdS/bfwDjcy4xLFlfY5KOA",
+                                            public_keys: [
+                                                {
+                                                    key_validity_url:
+                                                        "https://vector.im/_matrix/identity/api/v1/pubkey/isvalid",
+                                                    public_key: "ta8IQ0u1sp44HVpxYi7dFOdS/bfwDjcy4xLFlfY5KOA",
+                                                },
+                                                {
+                                                    key_validity_url:
+                                                        "https://vector.im/_matrix/identity/api/v1/pubkey/ephemeral/isvalid",
+                                                    public_key: "h1V9G4Q6TZ5_zUNNbYShkwIf4ViJm4TbuGSRbEis4c4",
+                                                },
+                                            ],
+                                        },
+                                        origin_server_ts: 1559309954309,
+                                        sender: "@gqadonis:matrix.org",
+                                        state_key:
+                                            "pWJeFegmftxeLCCuRyrCRKeStCCFZuHDhJxgTRfQRNawiTCHJQoCuLPYkVbkViZlxrMtycwQUqxYutwCgHcvoSNFbXJtrLaswnbkMxQeYnjyuERBTkkRZYfUZNhkWcID",
+                                        type: "m.room.third_party_invite",
+                                        unsigned: { age: 42928466291 },
+                                        event_id: "$JVaKbOYhYqLA1I4rftFzxqDvtzI0WijRiB6nrgBSjPM",
+                                    },
+                                    {
+                                        content: {
+                                            avatar_url: "mxc://kapsi.fi/FUJcYeeynfFBUAuPaANxzbcd",
+                                            displayname: "Paul",
+                                            membership: "join",
+                                        },
+                                        origin_server_ts: 1578081233994,
+                                        sender: "@ptman:kapsi.fi",
+                                        state_key: "@ptman:kapsi.fi",
+                                        type: "m.room.member",
+                                        unsigned: { age: 17 },
+                                        event_id: "$/0VnhB2/rNMLbHkJvHaWX5oXtIeGxiS+oUuIOGIrG6s",
+                                    },
+                                    {
+                                        content: { github: { default_repo: "matrix-org/dendrite" } },
+                                        origin_server_ts: 1552486440128,
+                                        sender: "@brendan:abolivier.bzh",
+                                        state_key: "_@_neb_github:matrix.org",
+                                        type: "m.room.bot.options",
+                                        unsigned: { age: 49751980472 },
+                                        event_id: "$uifWdRsOje+orht6aLq5JIlIP3x95G0Sg+Iz+mJJx8Y",
+                                    },
+                                    {
+                                        content: {
+                                            display_name: "cer...@min...",
+                                            key_validity_url:
+                                                "https://vector.im/_matrix/identity/api/v1/pubkey/isvalid",
+                                            public_key: "ta8IQ0u1sp44HVpxYi7dFOdS/bfwDjcy4xLFlfY5KOA",
+                                            public_keys: [
+                                                {
+                                                    key_validity_url:
+                                                        "https://vector.im/_matrix/identity/api/v1/pubkey/isvalid",
+                                                    public_key: "ta8IQ0u1sp44HVpxYi7dFOdS/bfwDjcy4xLFlfY5KOA",
+                                                },
+                                                {
+                                                    key_validity_url:
+                                                        "https://vector.im/_matrix/identity/api/v1/pubkey/ephemeral/isvalid",
+                                                    public_key: "07kIbCYdYZgqrbb833eba8FRXTg1Px2dHXDXeFmBG5k",
+                                                },
+                                            ],
+                                        },
+                                        origin_server_ts: 1559309952689,
+                                        sender: "@gqadonis:matrix.org",
+                                        state_key:
+                                            "QOeqQzlvYuIrRlRJrpBcUnfvUYvzCKSdUIbWEmAfqZvurocZMUAVXHXduvvDkVdwgdFpwelIdfCOOVuQfyvJPBkuRCorQzAjEfRKgfvsHPMqQIDDgrBwaPpRIhrWLxrB",
+                                        type: "m.room.third_party_invite",
+                                        unsigned: { age: 42928467911 },
+                                        event_id: "$hiU8QhczPHmCXtdZSuTRS2P0VeLeO7U0giXdFOgi54Q",
+                                    },
+                                    {
+                                        content: {
+                                            avatar_url: "mxc://matrix.bn4t.me/lOtGykrTutHQVjopQEedPuFI",
+                                            displayname: "bn4t",
+                                            membership: "join",
+                                        },
+                                        origin_server_ts: 1601359418410,
+                                        sender: "@bn4t:matrix.bn4t.me",
+                                        state_key: "@bn4t:matrix.bn4t.me",
+                                        type: "m.room.member",
+                                        unsigned: {
+                                            age: 19,
+                                            replaces_state: "$ikN+F8FNXIGrn9wnYeRqx/QhemVOlZSlyK5sxxQsgxw",
+                                        },
+                                        event_id: "$ur2VaxjeCHB1jYVInCXBW3FVYvofICCVc8lIwqpQGCc",
+                                    },
+                                ],
+                            },
+                            "account_data": { events: [] },
+                            "ephemeral": { events: [] },
+                            "unread_notifications": { notification_count: 0, highlight_count: 0 },
+                            "summary": { "m.joined_member_count": 462, "m.invited_member_count": 2 },
+                            "org.matrix.msc2654.unread_count": 0,
+                        },
+                    },
+                },
+            });
+            await httpBackend!.flushAllExpected();
+
+            httpBackend!.when("POST", "/join/%23dendrite-dev%3Amatrix.org").respond(200, {
+                room_id: "!yjVgJUsMLYLAONsoii:jki.re",
+            });
+            await httpBackend!.flushAllExpected();
+
+            httpBackend!.when("GET", "/sync").respond(200, {
+                rooms: {
+                    join: {},
+                },
+            });
+            await httpBackend!.flushAllExpected();
+
+            await prom;
+
+            const room = client!.getRoom("!yjVgJUsMLYLAONsoii:jki.re")!;
+            expect(room.name).toBe("#dendrite-dev:matrix.org");
+        });
     });
 
     describe("timeline", () => {
@@ -1589,13 +2268,12 @@
     });
 
     describe("of a room", () => {
-        it.skip(
+        it.todo(
             "should sync when a join event (which changes state) for the user" +
                 " arrives down the event stream (e.g. join from another device)",
-            () => {},
         );
 
-        it.skip("should sync when the user explicitly calls joinRoom", () => {});
+        it.todo("should sync when the user explicitly calls joinRoom");
     });
 
     describe("syncLeftRooms", () => {

I also cannot reproduce this using the app, if anyone has seen this recently please comment here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Room-List A-Timeline O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect
Projects
None yet
Development

No branches or pull requests

5 participants