Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEmptyToken is returned when the room token is empty ErrEmptyToken = errors.New("given an empty token") // ErrRoomNotFound is returned when a room with the given token could not be found ErrRoomNotFound = errors.New("room could not be found") // ErrNotModeratorInLobby is returned when the room is in lobby mode but the user is not a moderator ErrNotModeratorInLobby = errors.New("room is in lobby mode but user is not a moderator") // ErrUnexpectedReturnCode is returned when the server did not respond with an expected return code ErrUnexpectedReturnCode = errors.New("unexpected return code") )
Functions ¶
This section is empty.
Types ¶
type TalkRoom ¶
TalkRoom represents a room in Nextcloud Talk
func NewTalkRoom ¶ added in v0.1.0
NewTalkRoom returns a new TalkRoom instance Token should be the Nextcloud Room Token (e.g. "d6zoa2zs" if the room URL is https://cloud.mydomain.me/call/d6zoa2zs)
func (*TalkRoom) ReceiveMessages ¶
ReceiveMessages starts watching for new messages
func (*TalkRoom) SendMessage ¶
func (t *TalkRoom) SendMessage(msg string) (*ocs.TalkRoomMessageData, error)
SendMessage sends a message in the Talk room
func (*TalkRoom) TestConnection ¶
TestConnection tests the connection with the Nextcloud Talk instance and returns an error if it could not connect
Click to show internal directories.
Click to hide internal directories.