Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile pictures in notifications #236

Open
maximbaz opened this issue Jul 10, 2023 · 1 comment
Open

Profile pictures in notifications #236

maximbaz opened this issue Jul 10, 2023 · 1 comment

Comments

@maximbaz
Copy link
Contributor

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?

@boxdot
Copy link
Owner

boxdot commented Jul 11, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants