1
0
Fork 0
mirror of https://github.com/matrix-org/gomatrix synced 2025-06-07 07:13:23 +00:00
This commit is contained in:
Marcel 2018-04-12 16:14:50 +00:00 committed by GitHub
commit 53ee6acf4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,13 +7,13 @@ import (
// Event represents a single Matrix event.
type Event struct {
StateKey *string `json:"state_key,omitempty"` // The state key for the event. Only present on State Events.
Sender string `json:"sender"` // The user ID of the sender of the event
Type string `json:"type"` // The event type
Timestamp int64 `json:"origin_server_ts"` // The unix timestamp when this message was sent by the origin server
ID string `json:"event_id"` // The unique ID of this event
RoomID string `json:"room_id"` // The room the event was sent to. May be nil (e.g. for presence)
Content map[string]interface{} `json:"content"` // The JSON content of the event.
StateKey *string `json:"state_key,omitempty"` // The state key for the event. Only present on State Events.
Sender string `json:"sender,omitempty"` // The user ID of the sender of the event
Type string `json:"type"` // The event type
Timestamp int64 `json:"origin_server_ts,omitempty"` // The unix timestamp when this message was sent by the origin server
ID string `json:"event_id,omitempty"` // The unique ID of this event
RoomID string `json:"room_id,omitempty"` // The room the event was sent to. May be nil (e.g. for presence)
Content map[string]interface{} `json:"content"` // The JSON content of the event.
}
// Body returns the value of the "body" key in the event content if it is