mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-12-22 17:01:50 +00:00
Add list of joined room members
This commit is contained in:
parent
9c98ec1cf3
commit
c179fdc4b6
@ -16,6 +16,7 @@ type Room struct {
|
||||
topic string
|
||||
|
||||
creator internal.User
|
||||
joined []internal.User
|
||||
|
||||
events []RoomEvent
|
||||
|
||||
|
@ -48,6 +48,8 @@ func (user *User) CreateRoom(request createroom.Request) (internal.Room, *models
|
||||
Sender: user,
|
||||
OriginServerTS: t})
|
||||
|
||||
// TODO: Add join room event
|
||||
|
||||
// Set join rules event
|
||||
events = append(events, RoomEvent{
|
||||
Content: []byte(request.Visibility), // TODO: check visibility vs join rules
|
||||
@ -82,7 +84,8 @@ func (user *User) CreateRoom(request createroom.Request) (internal.Room, *models
|
||||
name: request.Name,
|
||||
topic: request.Topic,
|
||||
events: events,
|
||||
creator: user}
|
||||
creator: user,
|
||||
joined: []internal.User{user}}
|
||||
|
||||
for i, _ := range room.events {
|
||||
room.events[i].Room = room
|
||||
|
Loading…
Reference in New Issue
Block a user