mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 16:20:26 +00:00
parent
3e60cfafd3
commit
99d71c2177
@ -113,6 +113,15 @@ func (b *Bmatrix) Send(msg config.Message) (string, error) {
|
|||||||
// Edit message if we have an ID
|
// Edit message if we have an ID
|
||||||
// matrix has no editing support
|
// matrix has no editing support
|
||||||
|
|
||||||
|
// Use notices to send join/leave events
|
||||||
|
if msg.Event == config.EventJoinLeave {
|
||||||
|
resp, err := b.mc.SendNotice(channel, msg.Username+msg.Text)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
return resp.EventID, err
|
||||||
|
}
|
||||||
|
|
||||||
// Post normal message with HTML support (eg riot.im)
|
// Post normal message with HTML support (eg riot.im)
|
||||||
resp, err := b.mc.SendHTML(channel, msg.Username+msg.Text, html.EscapeString(msg.Username)+helper.ParseMarkdown(msg.Text))
|
resp, err := b.mc.SendHTML(channel, msg.Username+msg.Text, html.EscapeString(msg.Username)+helper.ParseMarkdown(msg.Text))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user