feat: images for web push notifications via imgproxy#3113
Draft
Soxasora wants to merge 4 commits into
Draft
Conversation
- extractUrls (markdown) supports a `limit` and a `type` parameter - getFirstImageUrl (item) uses `item.imgproxyUrls` or the first image in `item.text` notifications with images: - notifyUserSubscribers - notifyTerritorySubscribers - notifyThreadSubscribers - notifyItemMention - notifyMention
…lize sat filters in notification filters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #577
Adds image previews to web push notifications, using the first confirmed image in
item.imgproxyUrlsor the first image initem.text. Recipients that haveshowImagesAndVideos: falsewon't get image previews.The image preview only appears on notifications that surface content the recipient hasn't seen:
bits:
extractUrlsnow supportslimitandtypeto customize the url search in markdown text.It's used with
limit: 1andtype: 'image'to try to avoid notifications with a broken image preview.meetsUserSatFilterand its batch counterpart are now general user notification preferences (getUserNotificationPrefs) to getshowImagesAndVideoin a single query.Sat filters logic is untouched, just moved to make space for the media filter
Screenshots
tbd
Additional Context
I ignored the
imgproxyOnlyfilter because image previews are imgproxiedChecklist
Are your changes backward compatible? Please answer below:
yes
On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:
4, only chrome macOS and it doesn't even support images (macOS limitation)
Did you use AI for this? If so, how much did it assist you?
Yes, review and a bit of cleanup