arona icon indicating copy to clipboard operation
arona copied to clipboard

One Bot - feature request for room to chatroomid mapping

Open daktak opened this issue 3 years ago • 3 comments

If we can make a database that maps Line chat room Id's to Matrix room id's Then if the bot is messaged on a new channel, it can lookup the entry and create a new room if it does not exist. So you could add your matrix username to the config to add to all newly created channels. You could manual update the database for previously existing or change of mapping.

daktak avatar Jul 10 '22 01:07 daktak

Nice idea! https://github.com/web-tech-tw/matrix-line-bridge/tree/mapper

supersonictw avatar Jul 11 '22 07:07 supersonictw

https://github.com/web-tech-tw/matrix-line-bridge/commit/e0cd20307f186e7a909e4d98c9240e45ed99a6a6

I was thinking something like this. If the room mapping doesn't exist. Invite a user (as specified in .env) into a newly created one.

That way you can get any message from Line if the line user knows to talk to your bot.

daktak avatar Jul 12 '22 00:07 daktak

But I hope to use pair instead of creating new room. As a bot, it's not true to invite anyone except user (not only the admin of the bot) wants.

I don't know whether you're misunderstand, the channel of Messsaging API can be receive messages from different rooms.

https://github.com/web-tech-tw/matrix-line-bridge/blob/4af97c1d70e14124c677b2c6e966964d5b3e3b81/src/providers/line/listener/message/text.ts#L50

supersonictw avatar Jul 12 '22 07:07 supersonictw

Arona did it. https://github.com/web-tech-tw/arona/pull/18

supersonictw avatar Jul 21 '24 16:07 supersonictw