Skip to content

Commit

Permalink
fix: properly get quoted message author name in dc2mb()
Browse files Browse the repository at this point in the history
  • Loading branch information
adbenitez committed Jan 9, 2025
1 parent 50e0d94 commit 1d0cc92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions matterdelta/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ def dc2mb(bot: Bot, accid: int, msg: Message) -> None:
else:
event = ""
if msg.quote and mb_config.get("quoteFormat"):
quotenick = msg.quote.get(
"override_sender_name", msg.quote.get("author_display_name", "")
quotenick = msg.quote.get("override_sender_name") or msg.quote.get(
"author_display_name"
)
text = mb_config["quoteFormat"].format(
MESSAGE=text,
QUOTENICK=quotenick,
QUOTENICK=quotenick or "",
QUOTEMESSAGE=" ".join(msg.quote.text.split()),
)
data = {"username": username, "text": text, "event": event}
Expand Down

0 comments on commit 1d0cc92

Please sign in to comment.