diff options
author | Tulir Asokan <tulir@maunium.net> | 2020-03-01 22:35:21 +0200 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2020-03-01 22:35:25 +0200 |
commit | c829e436e46ace700045eaaf31bc4abf286e1156 (patch) | |
tree | 17fc5584554352279419759d273d283a130e3579 /matrix | |
parent | 5ea77a6c5f1ad351cdc0159181cc45ae3b1f3d1a (diff) |
Implement sending redactions
Diffstat (limited to 'matrix')
-rw-r--r-- | matrix/matrix.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go index 8cf2e96..4408ac5 100644 --- a/matrix/matrix.go +++ b/matrix/matrix.go @@ -768,7 +768,13 @@ func (c *Container) PrepareMarkdownMessage(roomID string, msgtype mautrix.Messag return localEcho } -// SendMarkdownMessage sends a message with the given markdown text to the given room. +func (c *Container) Redact(roomID, eventID, reason string) error { + defer debug.Recover() + _, err := c.client.RedactEvent(roomID, eventID, mautrix.ReqRedact{Reason: reason}) + return err +} + +// SendMessage sends the given event. func (c *Container) SendEvent(event *event.Event) (string, error) { defer debug.Recover() |