diff options
author | Tulir Asokan <tulir@maunium.net> | 2020-04-28 00:58:26 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2020-04-28 00:58:38 +0300 |
commit | 7d0d701c5014be43f993d34a52e122f41eedc18d (patch) | |
tree | aeae98e87e4971af21b446d3393547a4562899f7 /matrix/rooms | |
parent | 0e8e81a6078a98803f1012882f8c176fd3b5204e (diff) |
Add initial support for encrypting messages
Diffstat (limited to 'matrix/rooms')
-rw-r--r-- | matrix/rooms/room.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/matrix/rooms/room.go b/matrix/rooms/room.go index 45222e1..d5d1d8f 100644 --- a/matrix/rooms/room.go +++ b/matrix/rooms/room.go @@ -650,6 +650,17 @@ func (room *Room) GetMembers() map[id.UserID]*Member { return room.memberCache } +func (room *Room) GetMemberList() []id.UserID { + members := room.GetMembers() + memberList := make([]id.UserID, len(members)) + index := 0 + for userID, _ := range members { + memberList[index] = userID + index++ + } + return memberList +} + // GetMember returns the member with the given MXID. // If the member doesn't exist, nil is returned. func (room *Room) GetMember(userID id.UserID) *Member { |