diff options
author | Wim <wim@42.be> | 2019-01-03 00:07:50 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2019-01-03 00:07:50 +0100 |
commit | d2044c647b2e57ec5d5a7684177cf5e2e3325714 (patch) | |
tree | c0cd092f4cb2bb528f455e33d7f989e8f3099b7b /vendor/github.com/matterbridge/gomatrix/client.go | |
parent | c585d00f162cc244b381fcaaef7ac5b1efda2cf5 (diff) | |
download | matterbridge-msglm-d2044c647b2e57ec5d5a7684177cf5e2e3325714.tar.gz matterbridge-msglm-d2044c647b2e57ec5d5a7684177cf5e2e3325714.tar.bz2 matterbridge-msglm-d2044c647b2e57ec5d5a7684177cf5e2e3325714.zip |
Update vendor
* go-telegram-bot-api/telegram-bot-api
* lrstanley/girc
* matterbridge/gomatrix
Diffstat (limited to 'vendor/github.com/matterbridge/gomatrix/client.go')
-rw-r--r-- | vendor/github.com/matterbridge/gomatrix/client.go | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/vendor/github.com/matterbridge/gomatrix/client.go b/vendor/github.com/matterbridge/gomatrix/client.go index 90a07c68..acc92258 100644 --- a/vendor/github.com/matterbridge/gomatrix/client.go +++ b/vendor/github.com/matterbridge/gomatrix/client.go @@ -461,7 +461,12 @@ func (cli *Client) SendStateEvent(roomID, eventType, stateKey string, contentJSO // See http://matrix.org/docs/spec/client_server/r0.2.0.html#m-text func (cli *Client) SendText(roomID, text string) (*RespSendEvent, error) { return cli.SendMessageEvent(roomID, "m.room.message", - TextMessage{"m.text", text}) + TextMessage{"m.text", text, "", ""}) +} + +func (cli *Client) SendHTML(roomID, textclear, text string) (*RespSendEvent, error) { + return cli.SendMessageEvent(roomID, "m.room.message", + TextMessage{"m.text", textclear, "org.matrix.custom.html", text}) } // SendImage sends an m.room.message event into the given room with a msgtype of m.image @@ -490,7 +495,12 @@ func (cli *Client) SendVideo(roomID, body, url string) (*RespSendEvent, error) { // See http://matrix.org/docs/spec/client_server/r0.2.0.html#m-notice func (cli *Client) SendNotice(roomID, text string) (*RespSendEvent, error) { return cli.SendMessageEvent(roomID, "m.room.message", - TextMessage{"m.notice", text}) + TextMessage{"m.notice", text, "", ""}) +} + +func (cli *Client) SendNoticeHTML(roomID, textclear, text string) (*RespSendEvent, error) { + return cli.SendMessageEvent(roomID, "m.room.message", + TextMessage{"m.notice", textclear, "org.matrix.custom.html", text}) } // RedactEvent redacts the given event. See http://matrix.org/docs/spec/client_server/r0.2.0.html#put-matrix-client-r0-rooms-roomid-redact-eventid-txnid |