vijfhoek / telematrix

Bridge between Telegram and Matrix
MIT License
97 stars 19 forks source link

Uninstall - or ability to install against homeserver that previously had telematrix running #48

Open qbit opened 7 years ago

qbit commented 7 years ago

I ran into a strange issue on my homeserver. A year ago or so I had installed telematrix on my homeserver. Things worked, but I wanted to hold off until there was better puppet'ing support.

Fast forward to yesterday. I installed telematrix! (nice job - looks like a great bridge now!)

I ran into some issues though. Apparently the state from the previous install was persistent somewhere (I don't see exactly where.. - nothing in the application_services table.. As soon as telematrix started, synapse started sending all the 'unseen' messages to it. This took quite a while.. after which - I had an empty database.db file (no room relations, etc) and a non-functional bridge..

By manually adding an entry in chat_link, I can get one way communication (matrix -> tg) working, but not tg -> matrix..

Is there any way to "un-init" a given app service (by id maybe?) and start fresh?

qbit commented 7 years ago

Update - i was able to get tg->matrix working , but it's flaky (I didn't have bot permissions setup properly)

lil5 commented 6 years ago

@qbit so the issue is closed?

brycied00d commented 6 years ago

@qbit By the sound of it, it seems like you didn't change the "id" used in the appservice registration yaml. When telematrix connected/registered to your homeserver, it identified with the previous id so your homeserver treated it like it was reconnecting after a long break.

id: <user-defined unique ID of AS which will never change> Warning If the homeserver in question has multiple application services, each as_token and id MUST be unique per application service as these are used to identify the application service. The homeserver MUST enforce this.

https://matrix.org/docs/spec/application_service/unstable.html#registration

qbit commented 6 years ago

Ah, likely.