gurk-rs icon indicating copy to clipboard operation
gurk-rs copied to clipboard

Profile pictures in notifications

Open max-baz opened this issue 2 years ago • 1 comments

I'd love to have a profile picture of a sender in the desktop notification (if they have it). For that to work, I assume the avatars would need to be stored on disk.

Then we'd be able to pass them to Notification::new().summary(summary).body(text).image_path(avatar_path).show() like so.

I couldn't find anything about profiles in the code, how difficult do you think it would be to get the avatars saved? Could you share some pointers how you would implement this?

max-baz avatar Jul 10 '23 18:07 max-baz

We already retrieve profiles in resolve_name_from_profile in src/signal/impl.rs. At the moment, only profile name is used. However, the returned Profile struct does not contain the avatar. Digging deeper in the stack (gurk uses presage which uses libsignal-service-rs) they throw away the avatar in this place during decryption: https://github.com/whisperfish/libsignal-service-rs/blob/5dfe90b5caa90ede538e9b508a44544c0733a704/libsignal-service/src/push_service.rs#L318

I would take presage's cli example and use it to extend libsignal-service-rs.

boxdot avatar Jul 11 '23 19:07 boxdot