core icon indicating copy to clipboard operation
core copied to clipboard

it is not possible to know status update sender

Open adbenitez opened this issue 2 years ago • 1 comments

in a bot + webxdc interface setup, it can be important to know the status update sender, currently this is not possible the bot doesn't even know easily if an status update is from self without trusting the payload content that can be tampered by any malicious user

this restrict bots to 1:1 usage to be able to determine the user, since there is no way to differentiate users in a group without client-side sending selfAddr which is not trustworthy

adbenitez avatar Aug 29 '23 22:08 adbenitez

I believe the only way to make this possible is to add this information to the msgs_status_updates table before the messages are deleted because otherwise there is no way to reconstruct this information. I also think this would be very nice to have this information - at least on the bot side. For users of the webxdc-api it would also be very nice to get a unique identifier for every user in a group. But that is maybe out of scope for now - even though it definitely is a wanted feature!

Maybe for this issue, we can simply add this single column to the table and provide it in EventType::WebxdcStatusUpdate or with Context::get_status_update. For rust-api bots this would already be enough and for @adbenitez we can then extend the python methods.

CC @r10s @link2xt

Septias avatar Oct 12 '23 08:10 Septias