Add WhatsApp<->Matrix redaction bridging

This commit is contained in:
Tulir Asokan committed 2019-05-16 02:25:13 +03:00
1 parent ae92d71d5a
commit c1e1964fc5
6 files changed
+164 -2

No files matched your search

+7
View File
@@ -151,3 +151,10 @@ func (msg *Message) Insert() {
msg.log.Warnfln("Failed to insert %s@%s: %v", msg.Chat, msg.JID, err)
}
}
func (msg *Message) Delete() {
_, err := msg.db.Exec("DELETE FROM message WHERE chat_jid=$1 AND chat_receiver=$2 AND jid=$3", msg.Chat.JID, msg.Chat.Receiver, msg.JID)
if err != nil {
msg.log.Warnfln("Failed to delete %s@%s: %v", msg.Chat, msg.JID, err)
}
}