aboutsummaryrefslogtreecommitdiff
path: root/matrix/rooms
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-04-28 00:58:26 +0300
committerTulir Asokan <tulir@maunium.net>2020-04-28 00:58:38 +0300
commit7d0d701c5014be43f993d34a52e122f41eedc18d (patch)
treeaeae98e87e4971af21b446d3393547a4562899f7 /matrix/rooms
parent0e8e81a6078a98803f1012882f8c176fd3b5204e (diff)
Add initial support for encrypting messages
Diffstat (limited to 'matrix/rooms')
-rw-r--r--matrix/rooms/room.go11
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 {