diff options
Diffstat (limited to 'matrix')
-rw-r--r-- | matrix/matrix.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go index 2b0832b..4ed2dd9 100644 --- a/matrix/matrix.go +++ b/matrix/matrix.go @@ -283,11 +283,14 @@ func (c *Container) processOwnMembershipChange(evt *gomatrix.Event) { if membership == prevMembership { return } + room := c.GetRoom(evt.RoomID) switch membership { case "join": - c.ui.MainView().AddRoom(evt.RoomID) + c.ui.MainView().AddRoom(room) + room.HasLeft = false case "leave": - c.ui.MainView().RemoveRoom(evt.RoomID) + c.ui.MainView().RemoveRoom(room) + room.HasLeft = true case "invite": // TODO handle debug.Printf("%s invited the user to %s", evt.Sender, evt.RoomID) |