Commit 7e65043
feat(viewer): Filter viewer counts based on source opt-in
Introduces a mechanism to prevent viewer counts from unauthorized or non-opted-in sources from being aggregated and displayed. This ensures that only relevant and permitted viewer data contributes to the dashboard and other displays.
- Integrates `checkIfAllowed` calls into `background.js` within key viewer count processing functions:
- `sendToDestinations`: Skips individual `viewer_update` events from disallowed sources.
- `updateViewerCount`: Filters aggregated `viewer_updates` and legacy single `viewer_update` data.
- `combineHypeData`: Excludes chatters and viewers from disallowed sources during hype data combination.
- Prevents unintended inclusion of viewer data, particularly relevant for the recently added real-time viewer count feature.
[auto-enhanced]1 parent 42e3b3b commit 7e65043
1 file changed
+27
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5073 | 5073 | | |
5074 | 5074 | | |
5075 | 5075 | | |
| 5076 | + | |
| 5077 | + | |
| 5078 | + | |
| 5079 | + | |
| 5080 | + | |
5076 | 5081 | | |
5077 | | - | |
| 5082 | + | |
5078 | 5083 | | |
5079 | 5084 | | |
5080 | 5085 | | |
5081 | 5086 | | |
5082 | | - | |
| 5087 | + | |
5083 | 5088 | | |
5084 | 5089 | | |
5085 | 5090 | | |
| |||
8009 | 8014 | | |
8010 | 8015 | | |
8011 | 8016 | | |
8012 | | - | |
| 8017 | + | |
8013 | 8018 | | |
8014 | 8019 | | |
| 8020 | + | |
| 8021 | + | |
| 8022 | + | |
| 8023 | + | |
8015 | 8024 | | |
8016 | 8025 | | |
8017 | 8026 | | |
8018 | 8027 | | |
8019 | 8028 | | |
8020 | 8029 | | |
8021 | | - | |
| 8030 | + | |
8022 | 8031 | | |
8023 | 8032 | | |
| 8033 | + | |
| 8034 | + | |
| 8035 | + | |
| 8036 | + | |
8024 | 8037 | | |
8025 | 8038 | | |
8026 | 8039 | | |
| |||
8086 | 8099 | | |
8087 | 8100 | | |
8088 | 8101 | | |
8089 | | - | |
8090 | | - | |
| 8102 | + | |
| 8103 | + | |
8091 | 8104 | | |
| 8105 | + | |
| 8106 | + | |
| 8107 | + | |
8092 | 8108 | | |
8093 | 8109 | | |
8094 | 8110 | | |
8095 | 8111 | | |
8096 | | - | |
| 8112 | + | |
8097 | 8113 | | |
| 8114 | + | |
| 8115 | + | |
| 8116 | + | |
| 8117 | + | |
8098 | 8118 | | |
8099 | 8119 | | |
8100 | 8120 | | |
| |||
0 commit comments