From 2a3f475ff5abb510e9abe1af31a5a83b2066d86f Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 6 Feb 2022 23:56:54 +0100 Subject: Make EditSuffix option actually work (whatsapp). Fixes #1510 (#1728) To keep it backwards compatible we keep the "(edited)" message when no editsuffix is configured. --- bridge/whatsapp/whatsapp.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bridge/whatsapp/whatsapp.go') 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 -- cgit v1.2.3