summaryrefslogtreecommitdiffstats
path: root/bridge/whatsapp/whatsapp.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2022-02-06 23:56:54 +0100
committerGitHub <noreply@github.com>2022-02-06 23:56:54 +0100
commit2a3f475ff5abb510e9abe1af31a5a83b2066d86f (patch)
tree4abb4bda7a2a9a68361801b13d59d20e36f7e10b /bridge/whatsapp/whatsapp.go
parent7288f71201b648a7e2fc6e7b32f3c043604b70f6 (diff)
downloadmatterbridge-msglm-2a3f475ff5abb510e9abe1af31a5a83b2066d86f.tar.gz
matterbridge-msglm-2a3f475ff5abb510e9abe1af31a5a83b2066d86f.tar.bz2
matterbridge-msglm-2a3f475ff5abb510e9abe1af31a5a83b2066d86f.zip
Make EditSuffix option actually work (whatsapp). Fixes #1510 (#1728)
To keep it backwards compatible we keep the "(edited)" message when no editsuffix is configured.
Diffstat (limited to 'bridge/whatsapp/whatsapp.go')
-rw-r--r--bridge/whatsapp/whatsapp.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/bridge/whatsapp/whatsapp.go b/bridge/whatsapp/whatsapp.go
index 7b574c1c..ba0ede64 100644
--- a/bridge/whatsapp/whatsapp.go
+++ b/bridge/whatsapp/whatsapp.go
@@ -293,7 +293,11 @@ func (b *Bwhatsapp) Send(msg config.Message) (string, error) {
if msg.ID != "" {
b.Log.Debugf("updating message with id %s", msg.ID)
- msg.Text += " (edited)"
+ if b.GetString("editsuffix") != "" {
+ msg.Text += b.GetString("EditSuffix")
+ } else {
+ msg.Text += " (edited)"
+ }
}
// Handle Upload a file