mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-11-23 19:02:19 +00:00
Move event types to common
This commit is contained in:
parent
33bb47bda8
commit
f7eb4f7e28
@ -12,6 +12,50 @@ const (
|
||||
MembershipBan Membership = "ban"
|
||||
)
|
||||
|
||||
// Type is type of event
|
||||
type EventType string
|
||||
|
||||
const (
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-aliases
|
||||
Aliases EventType = "m.room.aliases"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-canonical-alias
|
||||
CanonicalAlias EventType = "m.room.canonical_alias"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-create
|
||||
Create EventType = "m.room.create"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-join-rules
|
||||
JoinRules EventType = "m.room.join_rules"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-member
|
||||
Member EventType = "m.room.member"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-power-levels
|
||||
PowerLevels EventType = "m.room.power_levels"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-redaction
|
||||
Redaction EventType = "m.room.redaction"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-message
|
||||
Message EventType = "m.room.message"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-message-feedback
|
||||
MessageFeedback EventType = "m.room.message.feedback"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-name
|
||||
Name EventType = "m.room.name"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-topic
|
||||
Topic EventType = "m.room.topic"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-avatar
|
||||
Avatar EventType = "m.room.avatar"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-pinned-events
|
||||
PinnedEvents EventType = "m.room.pinned_events"
|
||||
)
|
||||
|
||||
type Event struct {
|
||||
// TODO: object
|
||||
Content json.RawMessage `json:"content"` // Required. The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body.
|
||||
|
@ -6,50 +6,6 @@ import (
|
||||
"github.com/signaller-matrix/signaller/internal/models/events"
|
||||
)
|
||||
|
||||
// Type is type of event
|
||||
type Type string
|
||||
|
||||
const (
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-aliases
|
||||
Aliases Type = "m.room.aliases"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-canonical-alias
|
||||
CanonicalAlias = "m.room.canonical_alias"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-create
|
||||
Create = "m.room.create"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-join-rules
|
||||
JoinRules = "m.room.join_rules"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-member
|
||||
Member = "m.room.member"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-power-levels
|
||||
PowerLevels = "m.room.power_levels"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-redaction
|
||||
Redaction = "m.room.redaction"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-message
|
||||
Message = "m.room.message"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-message-feedback
|
||||
MessageFeedback = "m.room.message.feedback"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-name
|
||||
Name = "m.room.name"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-topic
|
||||
Topic = "m.room.topic"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-avatar
|
||||
Avatar = "m.room.avatar"
|
||||
|
||||
// https://matrix.org/docs/spec/client_server/latest#m-room-pinned-events
|
||||
PinnedEvents = "m.room.pinned_events"
|
||||
)
|
||||
|
||||
type JoinRule string
|
||||
|
||||
const (
|
||||
|
Loading…
Reference in New Issue
Block a user