aboutsummaryrefslogtreecommitdiff
path: root/matrix/room
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2018-03-22 21:44:46 +0200
committerTulir Asokan <tulir@maunium.net>2018-03-22 21:45:02 +0200
commit152b89ed5e6a4a3edbfc40222b4388049a213b82 (patch)
treee8507622e14f873128dd457b0f95f13cc460b459 /matrix/room
parent702a75a8c0355737e3e62735b59fe30bee7e42f4 (diff)
Add support for m.emote. Fixes #6
Diffstat (limited to 'matrix/room')
-rw-r--r--matrix/room/room.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/matrix/room/room.go b/matrix/room/room.go
index c006bd3..4166fd7 100644
--- a/matrix/room/room.go
+++ b/matrix/room/room.go
@@ -225,6 +225,11 @@ func (room *Room) GetMember(userID string) *Member {
return member
}
+// GetSessionOwner returns the Member instance of the user whose session this room was created for.
+func (room *Room) GetSessionOwner() *Member {
+ return room.GetMember(room.SessionUserID)
+}
+
// NewRoom creates a new Room with the given ID
func NewRoom(roomID, owner string) *Room {
return &Room{