ThomasDavisA / simple-twitch-chat-visualizer

0 stars 0 forks source link

Client use 'api/users/messages'. #55

Closed mdavisprog closed 3 years ago

mdavisprog commented 3 years ago

This pull request implements the new server function 'api/users/messages'. The client will now grab the list of all messages since the last time this function is called and store the list of messages per Chatter component. Each chatter will then display these messages one by one on a timer until all messages have been displayed. This is a first pass implementation. A more polished look will be implemented in the future.

Two environment variables have been added to alter the behavior of this. REACT_APP_USERS_INTERVAL controls how long between fetching the users and messages. This is set to 3 seconds by default. REACT_APP_MESSAGE_INTERVAL controls how long to display messages one by one for each chatter. This is set to 2 seconds by default. Override these in your local .env.local file to alter the behavior.

TEST_MESSAGES has been updated to reflect the new api changes. This is useful for seeing the behavior of this without needing to test within a Twitch chat room.

Close #44

ThomasDavisA commented 3 years ago

This looks good! Merging now.