mirror of
https://github.com/maubot/maubot
synced 2025-09-02 00:00:39 +00:00
Fix passive command regex compiling and send m.notices by default
This commit is contained in:
parent
ba6bbead12
commit
b805641ea4
4 changed files with 11 additions and 4 deletions
|
@ -143,11 +143,15 @@ func (client *Client) JoinRoom(roomID string) (resp *gomatrix.RespJoinRoom, err
|
|||
}
|
||||
|
||||
func (client *Client) SendMessage(roomID, text string) (string, error) {
|
||||
return client.SendContent(roomID, format.RenderMarkdown(text))
|
||||
content := format.RenderMarkdown(text)
|
||||
content.MsgType = gomatrix.MsgNotice
|
||||
return client.SendContent(roomID, content)
|
||||
}
|
||||
|
||||
func (client *Client) SendMessagef(roomID, text string, args ...interface{}) (string, error) {
|
||||
return client.SendContent(roomID, format.RenderMarkdown(fmt.Sprintf(text, args...)))
|
||||
content := format.RenderMarkdown(fmt.Sprintf(text, args...))
|
||||
content.MsgType = gomatrix.MsgNotice
|
||||
return client.SendContent(roomID, content)
|
||||
}
|
||||
|
||||
func (client *Client) SendContent(roomID string, content gomatrix.Content) (string, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue