twitchdev / extensions-hello-world

The Simplest Extension in the (Hello) World
Apache License 2.0
177 stars 85 forks source link

createRequest assigns the wrong success callback #21

Open DaDummy opened 5 years ago

DaDummy commented 5 years ago

According to the comment in logSuccess the hello-world sample should use the broadcast functionality of PubSub to trigger the actual color change. https://github.com/twitchdev/extensions-hello-world/blob/b5eb29a842829691391b687174f5a17d0ff0c0a0/public/viewer.js#L56-L60

But due to createRequest pointing to updateBlock instead of logSuccess the current implementation effectively does not need broadcasts when tested with a single user. https://github.com/twitchdev/extensions-hello-world/blob/b5eb29a842829691391b687174f5a17d0ff0c0a0/public/viewer.js#L14-L22