1
0
mirror of https://github.com/nikoksr/notify.git synced 2025-01-10 00:28:36 +02:00
notify/service/matrix/types.go
Arno Cornette d2dfd10850
feat(service): add matrix service (#410)
* feat(service): implemented matrix service

* docs(readme): add matrix service

* chore(format) Reformatted with gofumpt

* docs(readme): updated readme and added doc

* chore(rename): Rename functions to be compliant with project style

* chore(formatting): Reformatted docs

* docs(changes): Modified the service and path to it in the documentation.

* chore(format): Reformated with Gofump
2022-10-04 18:01:09 +03:00

29 lines
729 B
Go

package matrix
import (
"maunium.net/go/mautrix/event"
"maunium.net/go/mautrix/id"
)
// ServiceOptions allow you to configure the Matrix client options.
type ServiceOptions struct {
homeServer string
accessToken string
userID id.UserID
roomID id.RoomID
}
// Message structure that reassembles the SendMessageEvent
type Message struct {
Body string `json:"body"`
Format string `json:"format,omitempty"`
FormattedBody string `json:"formatted_body,omitempty"`
Msgtype event.MessageType `json:"msgtype"`
}
// Matrix struct that holds necessary data to communicate with the Matrix API
type Matrix struct {
client matrixClient
options ServiceOptions
}