create signal group for existing matrix room
In previous versions of the mautrix signal bridge there was a command to create a new signal group for an existing matrix room.
It was called !signal create but it doesn't exist anymore in the help.
Maybe it is gone due to some refactorings.
I tried to get it working otherwise and found https://github.com/mautrix/signal/blob/4b634863890e7818febc8b9b8341da52ccf61cb6/ROADMAP.md?plain=1#L73 and thought it would work by inviting the puppet to a matrix room (after inviting the signal bridge bot and the relaybot), but it doesn't work that way. Then I read, that I have to manually update the mxid in the portals table: https://github.com/mautrix/docs/blob/ba35623221db24e86071bc73f2b9ef54607b7879/bridges/general/relay-mode.md?plain=1#L24 What exactly do I have to do? Should I create another room in signal, bridge it to matrix and than try to change its mxid to the existing room?
My use case is to bridge a matrix room via relaybots to telegram and signal.
I have some rooms working that way, but I made it working with the !signal create command in the past, that is missing now.
Is it planned to reimplement it?
I figured out how to hack this. DISCLAIMER: do this at own risk as it is more advanced and includes editing the database tables!
- Create Signal and WhatsApp groups in their respective native group / use the
createcommand still existing in Telgeram - find the mxids for each group using the
/devtoolscommand in the matrix room - Connect to the database, in my case this is a docker container as installed using the ansible playbook from Slavi:
sudo docker exec -it matrix-postgres bash
psql
- then find the mxids for the created Signal & WhatsApp\Telegram groups
\c matrix_mautrix_signal
\dt
\d+ portal
\x
\TABLE portal;
R
- repeat 4. replacing "signal" with "whatsapp" \ "telegram" in a separate terminal
- in EITHER the signal or whatsapp database table update the mxid so that the signal and whatsapp room have the same mxid
UPDATE portal SET mxid = 'matrix room id gotten from /devtools in matrix room' WHERE id = 'corresponding id for whatsapp room to change';
\q
\exit
- after a successful update and exiting simply restart the container / bridge
\sudo docker container restart matrix-mautrix-whatsapp - and continue as normal with
!signal set-relayand!wa set-relayto relay non-logged in users in the now joined group.
NOTE: this will leave a now disconnected empty room which used to be connected to the Signal/WhatsApp group which can be cleaned up if need be.
If someone has an easier way of doing this or sees a problem with doing it this way please make sure to let us know by replying to this message. 😄 Thanks in advance and I hope this helps others who are looking for an answer to this...