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

Can't re-join room #38

Open
Archehandoro opened this issue Jan 13, 2020 · 1 comment
Open

Can't re-join room #38

Archehandoro opened this issue Jan 13, 2020 · 1 comment

Comments

@Archehandoro
Copy link

Hello,
After some trial-error, I managed to run the bridge. However, in the way, I did few mistakes that now are haunting me a little.

First, after several registration attempts, there are some ghost accounts in the db. Is there a way to delete these?

Secondly, and more important, I exited some Signal groups on Riot by mistake. This generates the following error, logged on the Signal Protocol room in Riot, whenever I text said group from Signal:

Error in handleThirdPartyRoomMessage { [M_FORBIDDEN: User @myuser:example.com not in room !USQQarexGYqQAJuxZr:example.com ()] errcode: 'M_FORBIDDEN', name: 'M_FORBIDDEN', message: 'User @myuser:example.com not in room !USQQarexGYqQAJuxZr:example.com ()', data: { errcode: 'M_FORBIDDEN', error: 'User @myuser:example.com not in room !USQQarexGYqQAJuxZr:example.com ()' }, httpStatus: 403, event: MatrixEvent { event: { event_id: '~!USQQarexGYqQAJuxZr:example.com:m1578910306482.10', user_id: '@myuser:example.com', room_id: '!USQQarexGYqQAJuxZr:example.com', type: 'm.room.message', origin_server_ts: 1578910306482, content: { body: 'testing', msgtype: 'm.text' } }, sender: null, target: null, status: 'not_sent', error: [Circular], forwardLooking: true, _pushActions: null, _replacingEvent: null, _clearEvent: {}, _senderCurve25519Key: null, _claimedEd25519Key: null, _forwardingCurve25519KeyChain: [ [length]: 0 ], _decryptionPromise: null, _retryDecryption: false, _txnId: 'm1578910306482.10' } } { roomId: 'wBC5TVJzDR+rBb5YdHFERA==', senderId: undefined, senderName: null, text: 'testing' } 
If I try to join the room !USQQarexGYqQAJuxZr:example.com again, it fails saying I am not invited to the room. When the rooms are first synced with signalbot, the bot invites me but also makes me an admin of the room, and afterwards exists the room.

Is there a way to re-invite my user to that particular room so I can send messages from within the synapse server? Or would it be possible to delete the room perhaps and re-sync?

Thanks!

@josefbachmann
Copy link

josefbachmann commented Feb 6, 2020

@Archehandoro

You can join a room you left via admin-api.
I looked up an access token in my database (table: access_tokens) from a member still in the room (table: room_memberships).

Then you can run a POST REST-Call like:

curl -X POST -d '{"user_id":"@userToInvite:yourdomain.xy"}' 'https://yourdomain.xy/_matrix/client/r0/rooms/!someroomID%3Ayourdomain.xy/invite?access_token=accessTokenFromUserStillInRoom'

the special chars in the room_id have to be encoded. If you don't know how you can create your example post here: https://matrix.org/docs/api/client-server/#!/Room32membership/inviteUser (without your access token !)

screenshot_2020-02-06_15-02-1580997748

screenshot_2020-02-06_15-02-1580997766

then copy the URL to your own curl POST, add the access_token and run it.

Edit: You can also deactivate user accounts: https://matrix.org/docs/api/client-server/#!/User32data/deactivateAccount

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants