From 08190a7ff4098f18cf29f9f7497241b867892747 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sat, 18 Jul 2020 22:47:40 +0200 Subject: [PATCH] Ensure uniqueness of Msg sender_strings list. Resolves #2127. --- evennia/comms/comms.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/evennia/comms/comms.py b/evennia/comms/comms.py index b9a308c350..e6ee5eef8c 100644 --- a/evennia/comms/comms.py +++ b/evennia/comms/comms.py @@ -396,7 +396,8 @@ class DefaultChannel(ChannelDB, metaclass=TypeclassBase): to build senders for the message. sender_strings (list, optional): Name strings of senders. Used for external connections where the sender is not an account or object. - When this is defined, external will be assumed. + When this is defined, external will be assumed. The list will be + filtered so each sender-string only occurs once. keep_log (bool or None, optional): This allows to temporarily change the logging status of this channel message. If `None`, the Channel's `keep_log` Attribute will be used. If `True` or `False`, that logging status will be used for this @@ -428,7 +429,7 @@ class DefaultChannel(ChannelDB, metaclass=TypeclassBase): if not msgobj: return False msgobj = self.message_transform( - msgobj, emit=emit, sender_strings=sender_strings, external=external + msgobj, emit=emit, sender_strings=list(set(sender_strings)), external=external ) self.distribute_message(msgobj, online=online) self.post_send_message(msgobj)