telesync should create per-sync bridge instances
Terrance opened this issue · comments
Consider a conversation sync involving multiple telesync bridges:
TG1 <--telesync--> HO <--telesync--> TG2
(This is the simplest case; a more likely example would be forwarding from an announcement HO to multiple other HOs, each with an associated TG chat.)
The chatbridge framework keeps a list of bridges (aka. norelay
) to indicate which bridges have already been crossed during a sync, in order to avoid message duping by sending an already-synced message back.
With telesync, the problem here is that it uses a single bridge instance for all its syncs, meaning only one telesync bridge can be crossed per message. A message sent in either TG1 or TG2 will reach the central hangout but not the opposite TG chat. A message sent in HO will only relay to the first TG chat encountered.
The solution is to create multiple bridge instances for each HO<->TG
pair. SlackRTM already does this -- see note in #833 (comment) or the initialisation.