whatsapp icon indicating copy to clipboard operation
whatsapp copied to clipboard

Bug: Relaying Messages between Two Bridges

Open formeo14 opened this issue 1 year ago • 2 comments

Issue Summary: I am attempting to relay messages from WhatsApp to a Signal group using two bridge bots. However, I have encountered two significant bugs that hinder the functionality and cause unwanted behavior.

Bug 1: Message Failure Ping Loop

  • Description: When a message fails to bridge between WhatsApp and Signal, it causes a continuous ping loop between the WhatsApp bridge bot and the Signal bridge bot. This loop results in the message being repeatedly spammed into the Element room, creating a disruptive experience and server failure.
  • Expected Behavior: Failed messages should be handled gracefully without causing a ping loop or spamming the Element room. e.g. excluding the accounts to relay.
  • Impact: This issue disrupts the communication flow and makes it impossible to manage the relaying process effectively.

Bug 2: Inability to Unrelay a Specific Account

  • Description: I am unable to selectively unrelay a specific account. Currently, I can only use the command "*": relay to manage relaying, but I cannot specify "*": relay, "@signal-bridgebot:domain.com": unrelay to disable relaying for a particular account. This limitation prevents me from stopping the relaying of commands (e.g., !wa) or the entire !wa help message from appearing in the Signal group. Or the other way.
  • Expected Behavior: The ability to unrelay a specific account or bot should be supported, allowing for more granular control over the relaying process.
  • Impact: This issue is particularly annoying when bridging between two messaging platforms like Signal and WhatsApp, as it leads to unwanted commands or messages appearing in the Signal or WhatsApp group.

Additional Notes:

  • The most critical issue is the ping loop caused by a failed message, as it significantly breaks the relaying process.
  • Attached is a picture illustrating the ping loop issue.

Attachments: Picture of Ping Loop Issue Start of Ping Loop Issue

Environment:

  • Bridge Bots: WhatsApp Bridge Bot, Signal Bridge Bot
  • Messaging Platforms: WhatsApp, Signal, Synapse
  • Element Room: Used for relaying messages

Steps to Reproduce:

  1. Configure message relaying between WhatsApp and Signal using two bridge bots.
  2. Set up the bot to send a message on failure.
  3. Attempt to relay a message that is expected to fail, such as a not available command for the bot.
  4. Observe the ping loop in the Element room.

Expected Outcome:

  • The ping loop should be resolved, and failed messages should not spam the Element room.
  • The ability to unrelay a specific account should be implemented, allowing for better control over the relaying process.

Actual Outcome:

  • The ping loop continues, spamming the Element room with repeated messages.
  • The command to unrelay a specific account is not recognized, leading to unwanted messages in the Signal group.

formeo14 avatar Oct 27 '24 16:10 formeo14

Apologies for the confusion. I found the relevant code block for handling the 'block' command, which is used to block a user. Therefore, it appears that this functionality is an enhancement to the system. https://github.com/mautrix/go/blob/a59d4d78677fc948c0736569079454184fac2a72/bridgev2/bridgeconfig/permissions.go#L70 Also wrong repository

formeo14 avatar Oct 27 '24 16:10 formeo14

The pinging between the two bridges is still happening. Also with block!

formeo14 avatar Oct 27 '24 17:10 formeo14

Is this fixed?

formeo14 avatar Nov 09 '25 14:11 formeo14