summaryrefslogtreecommitdiffstats
path: root/bridge/whatsapp/whatsapp.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-11-28 22:18:36 +0100
committerWim <wim@42.be>2020-11-29 15:37:20 +0100
commited98c586c6bd9dadc01bfa33d975ac10752f97ed (patch)
tree1ef52620bd018e28cf2142c4bd84aa52f2e92699 /bridge/whatsapp/whatsapp.go
parent3e865708d6dc51290d6431efd21d4f9a3e9dfee7 (diff)
downloadmatterbridge-msglm-ed98c586c6bd9dadc01bfa33d975ac10752f97ed.tar.gz
matterbridge-msglm-ed98c586c6bd9dadc01bfa33d975ac10752f97ed.tar.bz2
matterbridge-msglm-ed98c586c6bd9dadc01bfa33d975ac10752f97ed.zip
Add support for deleting messages (whatsapp)
Diffstat (limited to 'bridge/whatsapp/whatsapp.go')
-rw-r--r--bridge/whatsapp/whatsapp.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/bridge/whatsapp/whatsapp.go b/bridge/whatsapp/whatsapp.go
index 8c2c9cfe..7b574c1c 100644
--- a/bridge/whatsapp/whatsapp.go
+++ b/bridge/whatsapp/whatsapp.go
@@ -281,14 +281,12 @@ func (b *Bwhatsapp) Send(msg config.Message) (string, error) {
if msg.ID == "" {
// No message ID in case action is executed on a message sent before the bridge was started
// and then the bridge cache doesn't have this message ID mapped
-
- // TODO 42wim Doesn't the app get clogged with a ton of IDs after some time of running?
- // WhatsApp allows to set any ID so in that case we could use external IDs and don't do mapping
- // but external IDs are not set
return "", nil
}
- // TODO delete message on WhatsApp https://github.com/Rhymen/go-whatsapp/issues/100
- return "", nil
+
+ _, err := b.conn.RevokeMessage(msg.Channel, msg.ID, true)
+
+ return "", err
}
// Edit message