From 179561c3df9ffd721bca3165ff234c5bc9315f95 Mon Sep 17 00:00:00 2001 From: nemesis Date: Tue, 11 Nov 2025 22:50:39 +0100 Subject: [PATCH] simplifier getUser --- asmodee.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/asmodee.py b/asmodee.py index 3881eea..5cb1f03 100644 --- a/asmodee.py +++ b/asmodee.py @@ -700,11 +700,12 @@ def getMessage(message): return(str(message)) def getUser(message): - match = re.search(r"^(@\w+:[^ :]+)", str(message)) - if match: - return str(match.group()) - else: - return "Quelqu'un" + #match = re.search(r"^(@\w+:[^ :]+)", str(message)) + #if match: + # return str(match.group()) + #else: + # return "Quelqu'un" + return message.sender async def getNick(room, message): # Obtenir le DisplayName à partir du mxid. sender = getUser(message)