aboutsummaryrefslogtreecommitdiff
path: root/matrix/rooms
diff options
context:
space:
mode:
Diffstat (limited to 'matrix/rooms')
-rw-r--r--matrix/rooms/room.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/matrix/rooms/room.go b/matrix/rooms/room.go
index 47f5602..53156a3 100644
--- a/matrix/rooms/room.go
+++ b/matrix/rooms/room.go
@@ -399,10 +399,14 @@ func (room *Room) createMemberCache() map[string]*mautrix.Member {
if events != nil {
for userID, event := range events {
member := &event.Content.Member
+ member.Membership = event.Content.Membership
+ if len(member.Displayname) == 0 {
+ member.Displayname = userID
+ }
if room.firstMemberCache == nil && userID != room.SessionUserID {
room.firstMemberCache = member
}
- if member.Membership != "leave" {
+ if member.Membership == mautrix.MembershipJoin || member.Membership == mautrix.MembershipInvite {
cache[userID] = member
}
}