Skip to content

fix: update subscriber role cache in real-time via EventSub events#3465

Open
servusrene wants to merge 1 commit intocrowbartools:v5from
servusrene:v5
Open

fix: update subscriber role cache in real-time via EventSub events#3465
servusrene wants to merge 1 commit intocrowbartools:v5from
servusrene:v5

Conversation

@servusrene
Copy link
Copy Markdown

Description of the Change

The subscriber cache was only populated at startup and conditionally on chat reconnect, causing $userRoles to not reflect new or expired subs until restart. Now the cache is updated immediately on sub/resub/gift sub/upgrade events, refreshed on stream online and chat reconnect, and subscribers are removed via onChannelSubscriptionEnd.

Applicable Issues

Fixes #3462

Testing

Just subscribe to a channel and do not restart the app

The subscriber cache was only populated at startup and conditionally on
chat reconnect, causing $userRoles to not reflect new or expired subs
until restart. Now the cache is updated immediately on sub/resub/gift
sub/upgrade events, refreshed on stream online and chat reconnect, and
subscribers are removed via onChannelSubscriptionEnd.
@servusrene
Copy link
Copy Markdown
Author

@zunderscore fyi

@zunderscore
Copy link
Copy Markdown
Collaborator

@zunderscore fyi

No need to tag me. Someone from the dev team will review when one of us has a chance.

@servusrene
Copy link
Copy Markdown
Author

No need to tag me. Someone from the dev team will review when one of us has a chance.

Sorry, I didn't know that. I just assumed that since you'd looked at the PR from @A-iko, you were in charge of that area.

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