30 lines
815 B
Go
30 lines
815 B
Go
package matrix
|
|
|
|
type RawEvent struct {
|
|
Type string `json:"type"`
|
|
Id string `json:"event_id"`
|
|
RoomId string `json:"room_id"`
|
|
Sender string `json:"sender"`
|
|
StateKey string `json:"state_key"`
|
|
OriginTimeStamp int64 `json:"origin_server_ts"`
|
|
Content struct {
|
|
Body string `json:"body"`
|
|
MsgType string `json:"msg_type"`
|
|
Membership string `json:"membership"`
|
|
AvatarURL string `json:"avatar_url"`
|
|
DisplayName string `json:"displayname"`
|
|
Format string `json:"format"`
|
|
FormattedBody string `json:"formatted_body"`
|
|
} `json:"content"`
|
|
}
|
|
|
|
type sendBody struct {
|
|
MsgType string `json:"msgtype"`
|
|
Body string `json:"body"`
|
|
}
|
|
|
|
type errorResponse struct {
|
|
Code string `json:"errcode"`
|
|
Error string `json:"error"`
|
|
}
|