summaryrefslogtreecommitdiffstats
path: root/bridge/gitter
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/gitter')
-rw-r--r--bridge/gitter/gitter.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/bridge/gitter/gitter.go b/bridge/gitter/gitter.go
index 9a7b3bf9..b1d68733 100644
--- a/bridge/gitter/gitter.go
+++ b/bridge/gitter/gitter.go
@@ -106,6 +106,17 @@ func (b *Bgitter) Send(msg config.Message) (string, error) {
flog.Errorf("Could not find roomID for %v", msg.Channel)
return "", nil
}
+ if msg.Event == config.EVENT_MSG_DELETE {
+ if msg.ID == "" {
+ return "", nil
+ }
+ // gitter has no delete message api
+ _, err := b.c.UpdateMessage(roomID, msg.ID, "")
+ if err != nil {
+ return "", err
+ }
+ return "", nil
+ }
if msg.ID != "" {
flog.Debugf("updating message with id %s", msg.ID)
_, err := b.c.UpdateMessage(roomID, msg.ID, msg.Username+msg.Text)