commetchat / commet

Your space to connect
https://commet.chat
GNU Affero General Public License v3.0
152 stars 10 forks source link

Kicking a different user from a room displays incorrectly #315

Closed imbev closed 1 month ago

imbev commented 1 month ago

Describe the bug If a userA kicks userB from a room, Commet will show "userA left the room".

To Reproduce Steps to reproduce the behavior:

  1. Use a client that can kick users from rooms
  2. Kick a user from a room
  3. Switch to Commet
  4. See error

Expected behavior See "userB left the room"

Device Information
**Device** Platform: `web` Version: `v0.2.1` Git Hash: `cf1a61c2679392dae0a72e91a1c470a472934989` Detail: `default` **System Info** Product: `Gecko`
imbev commented 1 month ago

This probably happens because userA is the event sender, even though userB is the one leaving the room.

{
  "state_key": "@sREDACTEDt:matrix.org",
  "prev_content": {
    "displayname": "sREDACTEDt",
    "membership": "join"
  },
  "content": {
    "membership": "leave"
  },
  "type": "m.room.member",
  "event_id": "$uIQgREDACTEDNhMM",
  "room_id": "!NqlREDACTEDFB:matrix.org",
  "sender": "@iREDACTEDv:matrix.org",
  "origin_server_ts": 1720657750725,
  "unsigned": {
    "replaces_state": "$ORREDACTEDBx8",
    "prev_content": {
      "displayname": "sREDACTEDt",
      "membership": "join"
    },
    "prev_sender": "@sREDACTEDt:matrix.org",
    "membership": "join",
    "age": 219422165,
    "com.famedly.famedlysdk.message_sending_status": 2
  }
}