diff options
author | Tulir Asokan <tulir@maunium.net> | 2020-02-22 01:30:43 +0200 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2020-02-22 01:30:43 +0200 |
commit | 806f0f1bf0fedcbeb526b11ab4f1d0d4c89e23e1 (patch) | |
tree | f0cd940fef6cba4098d4589c514eef136f4c9326 /matrix | |
parent | 455d9fc4c5726e4af9c40b36ee4f4ea18f65a8e9 (diff) |
Make invites mostly work
Diffstat (limited to 'matrix')
-rw-r--r-- | matrix/matrix.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go index 8819a5b..85c4a46 100644 --- a/matrix/matrix.go +++ b/matrix/matrix.go @@ -578,20 +578,22 @@ func (c *Container) processOwnMembershipChange(evt *mautrix.Event) { room := c.GetRoom(evt.RoomID) switch membership { case "join": + room.HasLeft = false + fallthrough + case "invite": if c.config.AuthCache.InitialSyncDone { c.ui.MainView().AddRoom(room) } - room.HasLeft = false case "leave": if c.config.AuthCache.InitialSyncDone { c.ui.MainView().RemoveRoom(room) } room.HasLeft = true room.Unload() - case "invite": - // TODO handle - debug.Printf("%s invited the user to %s", evt.Sender, evt.RoomID) + default: + return } + c.ui.Render() } func (c *Container) parseReadReceipt(evt *mautrix.Event) (largestTimestampEvent string) { |