forked from chanbakjsd/gotrix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
im.go
38 lines (32 loc) · 1.08 KB
/
im.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package event
import (
"github.com/diamondburned/gotrix/matrix"
)
var (
_ StateEvent = &RoomNameEvent{}
_ StateEvent = &RoomTopicEvent{}
_ StateEvent = &RoomAvatarEvent{}
_ StateEvent = &RoomPinnedEvent{}
)
// RoomNameEvent represents a state event where the room name is set.
// This is only used to be displayed. It's not unique and names can be duplicated.
type RoomNameEvent struct {
StateEventInfo `json:"-"`
Name string `json:"name,omitempty"` // This must not exceed 255 bytes.
}
// RoomTopicEvent represents a state event where the room topic is set.
type RoomTopicEvent struct {
StateEventInfo `json:"-"`
Topic string `json:"topic,omitempty"`
}
// RoomAvatarEvent represents a state event where the room avatar is set.
type RoomAvatarEvent struct {
StateEventInfo `json:"-"`
Image ImageInfo `json:"info,omitempty"`
URL matrix.URL `json:"url"`
}
// RoomPinnedEvent represents a state event where the list of events pinned are modified.
type RoomPinnedEvent struct {
StateEventInfo `json:"-"`
Pinned []matrix.EventID `json:"pinned"`
}