nicolabs / nicobot

🤟 A collection of *cool* chat bots 🤟
MIT License
1 stars 0 forks source link

Allow using own number for signal #34

Open nicobo opened 3 years ago

nicobo commented 3 years ago

When using the same number (aka userID) to send and receive messages with Signal (e.g. because we don't want to dedicate a number to the bot), askbot filters out the messages :

2021-01-10 13:32:19,715 DEBUG   Filtering message : {'envelope': {'source': '+33123456789', 'sourceDevice': 1, 'relay': None, 'timestamp': 1610285532813, 'dataMessage': None, 'syncMessage': {'sentMessage': {'timestamp': 1610285532813, 'message': 'Circuits', 'expiresInSeconds': 0, 'attachments': [], 'groupInfo': None, 'destination': '+33123456789'}, 'blockedNumbers': None, 'readMessages': None, 'type': None}, 'callMessage': None, 'receiptMessage': None}}
2021-01-10 13:32:19,715 DEBUG   Discarding message without data

It seems to be because the message appears as 'sent' even on the device receiving it.

=> allow this use case (by using sentMessage/message instead of dataMessage when the source is the same as the destination ?) => or, if acceptable, requires using a group for allowing the sender to also be a receiver ?