From fb407786a6adcff399c541d586591dc314413658 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Tue, 28 Mar 2017 16:33:25 +0200 Subject: [PATCH] Make sure that /reply doesn't duplicate mentions --- bottools/methods.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bottools/methods.py b/bottools/methods.py index 984bebc..03fae17 100644 --- a/bottools/methods.py +++ b/bottools/methods.py @@ -342,7 +342,7 @@ def reply(bot, update, args): else: mentions = [] - if "@%s" % sender.strip("@") != "@%s" % two.whoami().strip("@"): + if ("@%s" % sender.strip("@") != "@%s" % two.whoami().strip("@")) and not ("@%s" % sender.strip("@")) in [("@%s" % a.strip("@")) for a in args]: first = ["@%s" % sender.strip("@")] else: try: