tijder / SmsMatrix

A simple SMS <--> Matrix bridge.
https://matrix.to/#/#smsmatrix:matrix.org
GNU General Public License v3.0
216 stars 36 forks source link

Handling conversations with the bot, a riot contact and me #17

Closed Gredin67 closed 6 years ago

Gredin67 commented 6 years ago

I have one contact, let's call him "Him" that has no 3G connection, only wlan. Sometimes Him would contact me through SMS (Him-SMS) and sometimes through his Riot account (Him-Riot). Thus I have 2 conversations with Him in my riot client (Me-Riot) :

It would be nice to be able to merge these conversations somehow. And later handle encryption between the riot contacts or even better between the riot contacts and the bot.

Gredin67 commented 6 years ago

I added manually Him-Riot in the conversation with the bot that bridges Him-SMS. Then Me-Riot wrote a message in this conversation. The message did not appear as usual (when only the bot and me in the conversation) in my phone SMS app (Me-SMS). Neither did Him-SMS receive the message. Then I reboot my phone and the SMS was finally transmitted. This morning I reiterated the experience, and until now, the SMS has not been transmitted at all. When I connect in riot as the bot, I see the conversation, so the bot is not totally down. The bot is not able to bridge my messages from Me-Riot when Him-Riot is in the Him-SMS conversation. Good thing is that the Him-riot messages are not bridged to Him-SMS through the bot, a behavior that should be avoided when trying to solve this issue

edit : I sent a third message from Me-riot in this 3-conversation, and it was sent without reboot to Him-Riot and to Him-SMS through Me-SMS. But the second message has not been sent even after reboot. So 2 successes over 3 tries, behavior seems erratic.

MurzNN commented 6 years ago

The problem with bridging rooms or shared room is that each new message in room will be sent as new message to all room members excluding only author of current message. So if you will have Him-SMS ans Him-Riot, all messages from Him-Riot will be duplicated to Him-SMS too, not only for you.

Gredin67 commented 6 years ago

Well in practice it actually doesn't. The message from Him-Riot are not forwarded by the bot to Him-SMS. The bot is probably set up to bridge messages from Me-Riot on the conversations it created, no matter the additional contacts in those conversations added by Me-Riot. Otherwise it could have been a security issue because anyone managing to enter the conversation would be able to send a SMS to your phone.

Gredin67 commented 6 years ago

The only issues that I encounter are with long messages and closely sent messages #15. Moreover when this issue occurs, the SmsMatrix app stops sending (and storing #8) to Him-SMS for unknown reason, duration, and until an undetermined event (but at some point it works again). Maybe receiving another SMS from Him-SMS would make the bridge effective again.

I connected on a riot client as the bot-Riot and there seems to be no problem as it is still in the conversation. However I can see that multiple Device IDs have been connected over time with the Device name of the SmsMatrix app. Is this a normal behavior?

MurzNN commented 6 years ago

I describe a general issue with rooms for that needs, if SMS-bot is fix this issue - it's good. But Him-Riot will receive Him-SMS duplicates as new messages, yes? So if we create one room with more bridges (You, Him-SMS, Him-Matrix, Him-Telegram, Him-Skype, Him-Hangouts, etc) - each new message from any Him source will generate new incoming messages in all other Him accounts.

Also you will can't write reply to specific Him client, only for all Him clients at once.

For solve this issue we must provide some aggregated room, that aggregate messages from several rooms in one stream, and provide selection to which room post new message now (to Him-SMS, Him-Skype, etc).

Gredin67 commented 6 years ago

Him-Riot will receive Him-SMS duplicates as new messages

yes but it is not a problem in the use case where Him-riot is offline when Him-sms is writing (use of SMS when no data connection available, or when using a dumbphone). It is even good to have the whole conversation history in the riot room. In the end there is no need to send unencrypted sms when you can send encrypted messages in riot. My goal is to converge to riot and drag people from services unencrypted, not respecting privacy. I think the goal of smsmatrix is to be able to replace my sms app with a riot client, don't you think? This would be a huge advantage over whatsap and other messaging apps. The issue you raise is more an issue for matrix in general than for smsmatrix bot, isn't it?

As my issue isn't finally one, I close it.