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

fix(Reddit): empty smallImageKey causes presence bug #9285

Merged
merged 5 commits into from
Feb 20, 2025

Conversation

itsmeeudrino
Copy link
Contributor

Description

This PR fixes #9283, where the Reddit presence's setActivity call is ignored due to an empty smallImageKey value.

note: this might've been introduced in a breaking change for the extension, in which case i'm happy to open a PR for all affected presences :)

Acknowledgements

Screenshots

image

@Slowlife01
Copy link
Contributor

Do it like this. Why is Netflix getting special treatment anyway lol

https://github.com/PreMiD/Presences/blob/main/websites%2FY%2FYouTube%20Music%2Fpresence.ts#L134-L136

@Slowlife01
Copy link
Contributor

note: this might've been introduced in a breaking change for the extension, in which case i'm happy to open a PR for all affected presences :)

Should be handled on the extension side instead tbh

@itsmeeudrino
Copy link
Contributor Author

Why is Netflix getting special treatment anyway lol

Yeah, there's just some weirdness going on in some of these presences... i wish we could have stricter guidelines, or at least move them to userspace for example (Reddit@Bas950)

Should be handled on the extension side instead tbh

I think it would be a qol feature, but i don't mind if the interface got a bit strict.

@@ -66,7 +66,7 @@ presence.on('UpdateData', async () => {
largeImageKey: !pathname.includes('/r/netflix')
? ActivityAssets.Logo
: ActivityAssets.NetflixLogo,
smallImageKey: pathname.includes('/r/netflix') ? ActivityAssets.Logo : '',
...(pathname.includes('/r/netflix') && { smallImageKey: ActivityAssets.Logo }),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a fix for an extension bug? @Timeraa / @Bas950 ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really a bug—it just generates an error instead of removing the field

@theusaf theusaf enabled auto-merge (squash) February 19, 2025 19:13
@theusaf theusaf merged commit 0b16de1 into PreMiD:main Feb 20, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

reddit presence not showing on my discord
6 participants