Skip to content

fix(notifications): open WhatsApp chats and show sender photos - #1196

Merged
amnweb merged 2 commits into
amnweb:feat/notifications-menufrom
esershnr:fix/notifications-packaged-activator
Oct 24, 2026
Merged

amnweb merged 2 commits into
amnweb:feat/notifications-menufrom
esershnr:fix/notifications-packaged-activator

Conversation

@esershnr

Copy link
Copy Markdown

Two small fixes for #1194, tested with WhatsApp Desktop (Store/MSIX) on Windows 11 25H2.

Clicking opens the chat. WhatsApp declares its toast activator in its AppxManifest.xml (ToastNotificationActivation / ToastActivatorCLSID), not in the registry or on its Start menu shortcut, so _find_activator found nothing and the click fell back to showing the app. It now reads the manifest as a last step. _get_install_folder moved to toast_activation.py as get_install_folder, since windows_notification.py already imports that module and the other way round would be circular.

Sender photos. WhatsApp sends the sender's photo as an https URL. Windows has already downloaded it to draw the toast and records where it saved it under HKCU\Software\Microsoft\Windows\CurrentVersion\PushNotifications\wpnidm (Url, LocalPath). _get_image_path now takes that local copy for web images, and only if it lies inside the wpnidm folder. YASB never fetches anything itself, which would also tell the sender when the menu was opened. This key is undocumented, so if you'd rather not rely on it, the second commit can be dropped on its own.

Both have unit tests; ruff and pyright are clean.

With both fixes and your ordering change, the newest WhatsApp message is on top and shows the sender's photo (name and photo hidden here):

6

@amnweb
amnweb merged commit 434fbf3 into amnweb:feat/notifications-menu Oct 24, 2026
6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants