Skip to main content

Room Invites

  • question is, when it comes to knowing who invited you to a room, is the user's member room state the source of truth? Looks like it
  • here are all of the basic events in a room that was created and then invited another user:
"invite": {
"!UIayZfmTbMXGXJWATK:quiri.io": {
"invite_state": {
"events": [
{
"type": "m.room.join_rules",
"state_key": "",
"content": {
"join_rule": "invite"
},
"sender": "@loisel:quiri.io"
},
{
"type": "m.room.create",
"state_key": "",
"content": {
"room_version": "10",
"creator": "@loisel:quiri.io"
},
"sender": "@loisel:quiri.io"
},
{
"type": "m.room.member",
"state_key": "@loisel:quiri.io",
"content": {
"displayname": "Loisel",
"avatar_url": "MjAyNS0wNC0xOFQyMzoyODo1OS41OTIyMTU=",
"membership": "join"
},
"sender": "@loisel:quiri.io"
},
{
"type": "m.room.member",
"sender": "@loisel:quiri.io",
"content": {
"is_direct": true,
"displayname": "nigel",
"membership": "invite"
},
"state_key": "@nigel:quiri.io",
"origin_server_ts": 1745086563571,
"unsigned": {
"age": 206359996
},
"event_id": "$HPuKYzqWnCj2s6uYBuhETH97HjTT1a8XgGXHuW1J28o"
}
]
}
}
}
  • only room.create is included in the default state from which you can know who created the room but if you want to know specifically who invited you it seems that you need to inspect the room.member event