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

possible to bridge a existing room? #37

Closed
luxus opened this issue Jan 15, 2021 · 22 comments
Closed

possible to bridge a existing room? #37

luxus opened this issue Jan 15, 2021 · 22 comments

Comments

@luxus
Copy link

luxus commented Jan 15, 2021

sorry if its maybe a dumb question, but can I bridge a existing room to a existing or new group in signal?

@tacerus
Copy link

tacerus commented Jan 22, 2021

I'd like to know this as well.

@tacerus
Copy link

tacerus commented Jan 22, 2021

I made some progress, after joining the Signal bridge bot to an existing Matrix room, creating a new Signal group, and restarting the bridge to create a respective Matrix room for it, I entered the portal table in the database and replaced the mxid of the new "dummy" room with the ID of an existing room. My own messages are now synced between the new Signal group and the existing Matrix room, however messages of other users are not. I have a feeling Signal puppets are not a thing, and a workaround by just relaying all messages to through your own Signal user and putting a "matrixname" prefix is not implemented in this bridge.

@tacerus
Copy link

tacerus commented Jan 22, 2021

It's probably a limitation by the fact signald is just imitating a Signal desktop client, it's not actually spawning an independent bot to Signal.

@luxus
Copy link
Author

luxus commented Jan 22, 2021

okay, maybe as a workaround.. if I create a room on signal it got briged.. can I somehow get admin on matrix in that room that the signal bot created?

@tacerus
Copy link

tacerus commented Jan 22, 2021

In your Signal management room (as your bot admin user) you can use set-pl <level> [mxid] - try set-pl 100 !roomid:server.domain.com (the mxid of the room you want to become admin in - as long as the Signal bridge bot is admin in it already).

@luxus
Copy link
Author

luxus commented Jan 22, 2021

did you tried it? it didn't work for me .. I got a error that I should check the logs.. im using https://github.com/spantaleev/matrix-docker-ansible-deploy
and wasn't be able to find the logs of the signal docker :(

@tacerus
Copy link

tacerus commented Jan 22, 2021

I am using Synapse. You can find the logs by checking docker ps for the container ID and then executing docker logs <container ID>. Probably the mautrix-signal container will contain the relevant errors, else the signald one.

@luxus
Copy link
Author

luxus commented Jan 26, 2021

the right way to peek into the logs is journalctl -fu matrix-mautrix-signal
set-pl 100 didn't work it ask for a mxid (userid?) channels are not working :(
Not a valid user_id

using !signal set-pl 100 @luxus:domain worked in the channel I want to get admin

@ruifm
Copy link

ruifm commented Feb 7, 2021

I made some progress, after joining the Signal bridge bot to an existing Matrix room, creating a new Signal group, and restarting the bridge to create a respective Matrix room for it, I entered the portal table in the database and replaced the mxid of the new "dummy" room with the ID of an existing room. My own messages are now synced between the new Signal group and the existing Matrix room, however messages of other users are not. I have a feeling Signal puppets are not a thing, and a workaround by just relaying all messages to through your own Signal user and putting a "matrixname" prefix is not implemented in this bridge.

Thanks @tacerus seems to work for me!

@HansJK
Copy link

HansJK commented Mar 6, 2022

I made some progress, after joining the Signal bridge bot to an existing Matrix room, creating a new Signal group, and restarting the bridge to create a respective Matrix room for it, I entered the portal table in the database and replaced the mxid of the new "dummy" room with the ID of an existing room. My own messages are now synced between the new Signal group and the existing Matrix room, however messages of other users are not. I have a feeling Signal puppets are not a thing, and a workaround by just relaying all messages to through your own Signal user and putting a "matrixname" prefix is not implemented in this bridge.

Did this work? And can you create a simple tutorial on it?

@tacerus
Copy link

tacerus commented Mar 6, 2022

Sorry, I can only vaguely remember what I did last year in regards to this. However based on reading my comment from last year it seems to have only been a one way solution anyways, hence I doubt it would be of much interest.

@HansJK
Copy link

HansJK commented Mar 6, 2022

Shame, this is such a essential feature... :(

@notreal069
Copy link

I made some progress, after joining the Signal bridge bot to an existing Matrix room, creating a new Signal group, and restarting the bridge to create a respective Matrix room for it, I entered the portal table in the database and replaced the mxid of the new "dummy" room with the ID of an existing room. My own messages are now synced between the new Signal group and the existing Matrix room, however messages of other users are not. I have a feeling Signal puppets are not a thing, and a workaround by just relaying all messages to through your own Signal user and putting a "matrixname" prefix is not implemented in this bridge.

Did this work? And can you create a simple tutorial on it?

Are you still in need of help for this? Just confirmed that the process still works.

@HansJK
Copy link

HansJK commented Mar 25, 2022

Yes I would love to bridge existing rooms.

@HansJK
Copy link

HansJK commented Mar 25, 2022

Did some research on it.

In the docs, it says:

If you want to bridge existing rooms, you'll have to manually update the mxid column in the portal table to point to the room you want bridged.

How am I suppose to modify my config like what the docs says? I guess it's referring to this section:

permissions:
'*':relay
example.com: user
signal:example.com: admin

@tacerus
Copy link

tacerus commented Mar 25, 2022

@HansJK It's talking about the portal table in the SQL database. not the configuration file. But see my comment earlier in this thread for the pitfalls with this route.

@HansJK
Copy link

HansJK commented Mar 25, 2022

@tacerus Thanks.

My own messages are now synced between the new Signal group and the existing Matrix room, however messages of other users are not.

You are talking about other relay Matrix users not sending from Matrix to Signal?

I have a feeling Signal puppets are not a thing, and a workaround by just relaying all messages to through your own Signal user and putting a "matrixname" prefix is not implemented in this bridge.

Isn't this how it is today already? Sending a message from Matrix to signal using the bot Looks like this: Screenshot 2022-03-25 at 21 18 06

Sorry if I miss intrepid your reply.

@tacerus
Copy link

tacerus commented Mar 25, 2022

Very approximate guide to inserting this portal row in PostgreSQL:

  • Back up your database

  • Select the database:
    USE <name of relevant database

  • Find some example rows to use as guidance:
    SELECT * FROM portal LIMIT 10

  • Now either create a new row, following this this schema:

    INSERT INTO portal (

  • or, in my opinion better and safer, create a "dummy" room (non-existing group) first, then find it in the table and only replace the mxid field:

UPDATE portal SET mxid = '<your new mxid>' WHERE <column you want to filter by> = <value you want to filter by>

I forgot what values are handy to use for filtering, but I'm sure the SELECT call will give some ideas.

@tacerus
Copy link

tacerus commented Mar 25, 2022

Sorry if I miss intrepid your reply.

I'm sorry too, wish I could help further, but I did not find my old installation from back when I still used this and don't currently have a need for it anymore. :-(

@HansJK
Copy link

HansJK commented Mar 25, 2022

Thanks for the help! Have to spend som time on this one. First just wrapping my head around it.

This should really become a feature of the bridge! So you can bridge communities from different platforms together.

@jakecoppinger
Copy link

Someone who knows more about Matrix databases than myself - would there be any issues in adjusting the mxid's in the portal programmatically?

I'm thinking of having a crack writing a little bot with https://github.com/turt2live/matrix-bot-sdk to list out the portals database and modify if needed - hopefully in a user friendly way.

The only big issue I see is designing a good security model.

@brush
Copy link

brush commented May 14, 2022

Very approximate guide to inserting this portal row in PostgreSQL:
...

i just want to double-confirm that yes, this works. moreover, if you have double-puppeting set up per instructions (method #1) below, then you do get intelligible differentiation among different users on the signal side (via <name>: <msg>), and pretty seamless puppeting on the matrix side:

https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-playbook-bridge-mautrix-signal.md

@tulir tulir closed this as completed Aug 28, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

8 participants