From 92fbacbfcb9f523ea0660a73b0174bfad4528aee Mon Sep 17 00:00:00 2001 From: what <74026992+all-other-usernames-were-taken@users.noreply.github.com> Date: Wed, 6 Oct 2021 07:16:25 -0700 Subject: [PATCH] hacky fix for adding replies to bridge please note i have no idea on how to test these --- src/irc_link.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/irc_link.py b/src/irc_link.py index 948823b..6039976 100644 --- a/src/irc_link.py +++ b/src/irc_link.py @@ -59,6 +59,10 @@ async def initialize(): async def on_bridge_message(channel_name, msg): if channel_name in util.config["irc"]["channels"]: if channel_name not in joined: conn.join(channel_name) + # if its a reply + try: + if msg.reference: + conn.privmessage (channel_name, f"Replying to @{random_color(msg.reference.cached_message.author.id)}{msg.reference.cached_message.author.name}{color_code('')}:") # ping fix - zero width space embedded in messages line = f"<{random_color(msg.author.id)}{msg.author.name[0]}\u200B{msg.author.name[1:]}{color_code('')}> " + render_formatting(msg.message)[:400] conn.privmsg(channel_name, line)