diff --git a/bottools/methods.py b/bottools/methods.py index 00d65a3..e86db4a 100644 --- a/bottools/methods.py +++ b/bottools/methods.py @@ -332,12 +332,12 @@ def getMentions(tweet, two, args = []): for m in re.split('[^\w@]+', text): try: - if m[0] == "@" and m[0].strip() != "" and not (m in args or m.strip() == "" or m == "@%s" % two.whoami().strip("@") or m == "@%s" % sender.strip("@")): + if m[0] == "@" and m[0].strip() != "" and not (m in mentions or m in args or m.strip() == "" or m == "@%s" % two.whoami().strip("@") or m == "@%s" % sender.strip("@")): mentions += [m] except: pass - if not sender.strip("@") == two.whoami().strip("@"): + if not sender.strip("@") == two.whoami().strip("@") and not "@%s" % sender.strip("@") in mentions: mentions = ["@%s" % sender.strip("@")] + mentions return mentions