Skip to content

fix: 3462 - Update subscriber tier on subscription event.#3463

Closed
A-iko wants to merge 1 commit intocrowbartools:masterfrom
A-iko:3462/update-subscriber-tier-on-sub
Closed

fix: 3462 - Update subscriber tier on subscription event.#3463
A-iko wants to merge 1 commit intocrowbartools:masterfrom
A-iko:3462/update-subscriber-tier-on-sub

Conversation

@A-iko
Copy link
Copy Markdown

@A-iko A-iko commented Mar 26, 2026

Description of the Change

Updates the Twitch subscriber role cache when sub-related events occur, so new subscribers and tier changes are reflected immediately instead of only after restart. This fixes cases where subscriber-specific TTS setups would stop matching until Firebot was restarted.

Applicable Issues

Fixes #3462

Testing

Manual:

Reviewed the sub, resub, gift sub, gift upgrade, and Prime upgrade event paths to ensure they now update the cached subscriber tier immediately.
Confirmed the project still builds successfully with grunt prep.
Injected a subscription event to see if tiers got updated.

Regression:

Verified edited files had no diagnostics after the change.

@A-iko A-iko requested a review from ebiggz as a code owner March 26, 2026 22:16
@zunderscore
Copy link
Copy Markdown
Collaborator

This PR is targeting the master branch, which should not be targeted for bugfix or feature PRs into the Firebot codebase. Please review our contribution guidelines to ensure you are targeting the correct branch and following all policies.

@A-iko
Copy link
Copy Markdown
Author

A-iko commented Mar 27, 2026

This PR is targeting the master branch, which should not be targeted for bugfix or feature PRs into the Firebot codebase. Please review our contribution guidelines to ensure you are targeting the correct branch and following all policies.

Ah, I'm sorry, I must have skipped over that. I'll fix it in a bit.

@servusrene
Copy link
Copy Markdown

servusrene commented Mar 27, 2026

@A-iko I've also looked into the bug (weeks before) and prepared a commit, but I haven't submitted it yet. Would you like to take a look at it?

In my opinion, the following is still missing:

  • Handling of the onChannelSubscriptionEnd event: Remove the user from the cache when they are no longer a subscriber
  • Update the subscriber list when the streamer comes online to enable long-term runtime
  • Reload the list upon reconnection, even if the cache list is already full (this is necessary because events may not have been handled)

Furthermore, you could adapt the part of your code where you add a subscriber to the cache to match the mod or VIP code, making it more consistent.

EDIT: i have pushed it to gh: #3465

@A-iko
Copy link
Copy Markdown
Author

A-iko commented Mar 27, 2026

@servusrene Ah, what coincidence! I'm not opposed to just letting your PR take precedence here, your changes are definitely more robust. The things you mention as missing are definitely nice additions. I'm not really very familiar with the codebase yet so my implementation was a bit minimal.

@A-iko
Copy link
Copy Markdown
Author

A-iko commented Mar 27, 2026

I'll close this PR, just going with @servusrene 's solution will save us all some time :)
#3465

@A-iko A-iko closed this Mar 27, 2026
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.

New subscribers lack tier information.

3 participants