Skip to content

fix(X.com): remove broken dynamic clientID logic - #10979

Merged
skullysmods merged 2 commits into
PreMiD:mainfrom
sammtts:main
Jul 11, 2026
Merged

fix(X.com): remove broken dynamic clientID logic#10979
skullysmods merged 2 commits into
PreMiD:mainfrom
sammtts:main

Conversation

@sammtts

@sammtts sammtts commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

…vements

  • Update the Twitter application ID to fix Activity not appearing when "Enable Twitter" is enabled
  • Add "name" field to PresenceData to correctly update the activity name when "Enable Twitter" is enabled
  • Simplify asset image logic for better readability
  • Remove the deprecated and unnecessary presence.setActivity() call
  • Update the setting label from "Enable twitter" to "Enable Twitter"
  • Bump the version from 1.2.0 to 1.2.1

close #10847

Description

This PR fixes the issue reported in #10847, where no activity was displayed when the Enable Twitter setting was enabled.

The issue was caused by an outdated Twitter Application ID, which prevented Discord from displaying the activity correctly. This update replaces the old Application ID with a valid one, restoring Twitter Rich Presence functionality.

Additionally, this PR introduces a dynamic name field in PresenceData to ensure the activity name matches the selected platform. When Enable Twitter is enabled, the activity is displayed as Twitter; otherwise, it is displayed as X.com.

Other changes include:

  • Simplified the asset image selection logic for improved readability.
  • Corrected the asset selection logic to ensure the appropriate image is displayed for Twitter and X.com.
  • Removed the deprecated and unnecessary presence.setActivity() call.
  • Updated the setting label from Enable twitter to Enable Twitter for consistency.
  • Bumped the activity version from 1.2.0 to 1.2.1.

Acknowledgements

Screenshots

Proof showing the creation/modification is working as expected Screenshot 2026-07-09 010526 Screenshot 2026-07-09 010619 Screenshot 2026-07-09 010751

@dimerp

dimerp Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🖼️ Activity asset preview

Asset inspection complete. No pixels were harmed in the making of this comment. 🤖

X.com (websites/X/X.com) — update

Preview Source URL
logo https://cdn.rcd.gg/PreMiD/websites/X/X.com/assets/logo.png
thumbnail https://cdn.rcd.gg/PreMiD/websites/X/X.com/assets/thumbnail.png
code (presence.ts) https://cdn.rcd.gg/PreMiD/websites/X/X.com/assets/1.png
code (presence.ts) https://cdn.rcd.gg/PreMiD/websites/X/X.com/assets/0.png

Beep boop — I refresh this comment on every push, so no need to scroll. 🤖

@dimerp dimerp Bot added activity update multiple activities PR edits more than 1 activity labels Jul 9, 2026
…vements

- Update the Twitter application ID to fix Activity not appearing when "Enable Twitter" is enabled
- Add "name" field to PresenceData to correctly update the activity name when "Enable Twitter" is enabled
- Simplify asset image logic for better readability
- Remove the deprecated and unnecessary presence.setActivity() call
- Update the setting label from "Enable twitter" to "Enable Twitter"
- Bump the version from 1.2.0 to 1.2.1

close PreMiD#10847
@dimerp dimerp Bot removed the multiple activities PR edits more than 1 activity label Jul 9, 2026

@skullysmods skullysmods left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The Activity appears to freeze when the “Enable Twitter” setting is enabled. There must be another issue besides the clientID.

@sammtts

sammtts commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Hi there!

(Please note that I used a translator for this because I’m not confident in my written English)

This issue occurred because, when the Enable Twitter option was enabled, a new instance of Presence was created. Since the UpdateData listener was associated with the original instance, updates stopped running correctly and the activity froze at the last displayed state.

After reviewing the code, I realized that it wasn’t necessary to maintain multiple instances of Presence or switch between different Client IDs. The visual styling between X and Twitter is handled solely through the name and assets displayed in the activity, both of which are defined in the code itself.

Therefore, I removed the logic for switching instances and simplified the implementation to use a single instance of Presence, updating the information (name and logo) according to the user’s selected settings.

I uploaded a video to YouTube where you can see the Activity working as intended: https://www.youtube.com/watch?v=B2lKITmaKEw

Thanks for reviewing this! :)

@skullysmods

Copy link
Copy Markdown
Member

Hi there!

(Please note that I used a translator for this because I’m not confident in my written English)

This issue occurred because, when the Enable Twitter option was enabled, a new instance of Presence was created. Since the UpdateData listener was associated with the original instance, updates stopped running correctly and the activity froze at the last displayed state.

After reviewing the code, I realized that it wasn’t necessary to maintain multiple instances of Presence or switch between different Client IDs. The visual styling between X and Twitter is handled solely through the name and assets displayed in the activity, both of which are defined in the code itself.

Therefore, I removed the logic for switching instances and simplified the implementation to use a single instance of Presence, updating the information (name and logo) according to the user’s selected settings.

I uploaded a video to YouTube where you can see the Activity working as intended: https://www.youtube.com/watch?v=B2lKITmaKEw

Thanks for reviewing this! :)

I think that's actually the best thing to do to ensure the Activity works properly!

Changing the clientID isn't really necessary anymore since we can change the Activity's name dynamically.
The only advantage of having two clientIDs is for tracking by sites like PresenceDB.com, but that's minimal.

@skullysmods skullysmods changed the title fix(X.com): update broken client ID for Twitter and other minor impro… fix(X.com): remove broken dynamic clientID logic Jul 10, 2026
@skullysmods
skullysmods enabled auto-merge (squash) July 10, 2026 21:57
@skullysmods
skullysmods requested a review from a team July 10, 2026 21:57
@skullysmods
skullysmods merged commit 6a675ac into PreMiD:main Jul 11, 2026
7 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.

X (Twitter) | x.com

3 participants