Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create signal group for existing matrix room #572

Open
aiomaster opened this issue Dec 17, 2024 · 1 comment
Open

create signal group for existing matrix room #572

aiomaster opened this issue Dec 17, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@aiomaster
Copy link

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

* [x] Private chat/group creation by inviting Matrix puppet of Signal user to new room

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?

@aiomaster aiomaster added the enhancement New feature or request label Dec 17, 2024
@EtienneHenger
Copy link

I figured out how to hack this. DISCLAIMER: do this at own risk as it is more advanced and includes editing the database tables!

  1. Create Signal and WhatsApp groups in their respective native group / use the create command still existing in Telgeram
  2. find the mxids for each group using the /devtools command in the matrix room
  3. 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
  1. then find the mxids for the created Signal & WhatsApp\Telegram groups
\c matrix_mautrix_signal
\dt
\d+ portal
\x
\TABLE portal;
R
  1. repeat 4. replacing "signal" with "whatsapp" \ "telegram" in a separate terminal
  2. 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
  1. after a successful update and exiting simply restart the container / bridge
    \sudo docker container restart matrix-mautrix-whatsapp
  2. and continue as normal with !signal set-relay and !wa set-relay to 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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants