5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-22 08:10:26 +00:00

Make EditSuffix option actually work (whatsapp). Fixes #1510 (#1728)

To keep it backwards compatible we keep the "(edited)" message when no
editsuffix is configured.
This commit is contained in:
Wim 2022-02-06 23:56:54 +01:00 committed by GitHub
parent 7288f71201
commit 2a3f475ff5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -293,8 +293,12 @@ func (b *Bwhatsapp) Send(msg config.Message) (string, error) {
if msg.ID != "" { if msg.ID != "" {
b.Log.Debugf("updating message with id %s", msg.ID) b.Log.Debugf("updating message with id %s", msg.ID)
if b.GetString("editsuffix") != "" {
msg.Text += b.GetString("EditSuffix")
} else {
msg.Text += " (edited)" msg.Text += " (edited)"
} }
}
// Handle Upload a file // Handle Upload a file
if msg.Extra["file"] != nil { if msg.Extra["file"] != nil {