mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-11-22 02:12:20 +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
|
topic string
|
||||||
|
|
||||||
creator internal.User
|
creator internal.User
|
||||||
|
joined []internal.User
|
||||||
|
|
||||||
events []RoomEvent
|
events []RoomEvent
|
||||||
|
|
||||||
|
@ -48,6 +48,8 @@ func (user *User) CreateRoom(request createroom.Request) (internal.Room, *models
|
|||||||
Sender: user,
|
Sender: user,
|
||||||
OriginServerTS: t})
|
OriginServerTS: t})
|
||||||
|
|
||||||
|
// TODO: Add join room event
|
||||||
|
|
||||||
// Set join rules event
|
// Set join rules event
|
||||||
events = append(events, RoomEvent{
|
events = append(events, RoomEvent{
|
||||||
Content: []byte(request.Visibility), // TODO: check visibility vs join rules
|
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,
|
name: request.Name,
|
||||||
topic: request.Topic,
|
topic: request.Topic,
|
||||||
events: events,
|
events: events,
|
||||||
creator: user}
|
creator: user,
|
||||||
|
joined: []internal.User{user}}
|
||||||
|
|
||||||
for i, _ := range room.events {
|
for i, _ := range room.events {
|
||||||
room.events[i].Room = room
|
room.events[i].Room = room
|
||||||
|
Loading…
Reference in New Issue
Block a user