interrealm: Fix the msg formatting with special prefixes.
Tweaked by tabbott to cover all code blocks, not just quote blocks.
See
MODIFY
zulip/integrations/bridge_between_zulips/run-interrealm-bridge
zulip/integrations/bridge_between_zulips/run-interrealm-bridge
@@ -34,6 +34,10 @@ def create_pipe_event(to_client: zulip.Client, from_bot: Dict[str, Any],
# comes from
msg["content"] = msg["content"].replace("/user_uploads/",
from_bot["site"] + "/user_uploads/")
+ if msg["content"].startswith(("```", "- ", "* ", "> ", "1. ")):
+ # If a message starts with special prefixes, make sure to prepend a newline for
+ # formatting purpose
+ msg["content"] = "\n" + msg["content"]
msg_data = {
"sender": to_client.email,
"type": "stream",

interrealm: Fix the msg formatting with special prefixes.

Tweaked by tabbott to cover all code blocks, not just quote blocks.

See https://chat.zulip.org/#narrow/stream/127-integrations/topic/cross.20realm.20bridge/near/695907