When adding/deleting external actions, the UI would sometimes show
duplicated or cloned rows due to a race condition between:
1. The optimistic setActions() call updating local state
2. The save() callback updating externalActions in context
3. The useEffect syncing actions from externalActions
This fix removes the optimistic updates and lets the server response
be the single source of truth, updating the UI only after the context
is updated via the save() success callback.
Fixes#4347
Adds a Recoil atom (chatInputDraftAtom) to store the chat input draft,
which persists the text when the chat component unmounts/remounts during
mobile/desktop mode transitions.
Changes:
- Add chatInputDraftAtom to ClientConfigStore
- Update ChatTextField to save draft on input change
- Restore draft when component mounts
- Clear draft when message is sent
Closes#3615
- Combines 'Learn more' link and surrounding text into one Translation
- Fixes double space issue (was + regular space)
- Enables full sentence to be localized: '<a>Learn more</a> about Owncast browser notifications.'
Closes#4655
The banUser function in ChatModerationService was sending an incomplete
request body to the /api/chat/users/setenabled endpoint. The API requires
both userId and enabled fields, but only userId was being sent.
This caused the endpoint to return a 400 Bad Request with the error:
"must provide userId and enabled state"
Added the missing enabled: false parameter to properly disable the user
when banning.
Co-authored-by: Matt Pruitt <41898282+guitsaru@users.noreply.github.com>
Adds a 'readonly' prop to ChatContainer that conditionally applies a
'readonly-chat' CSS class to the chat container element. This allows
streamers using OBS to target the readonly chat embed with custom CSS.
The readonly embed at /embed/chat/readonly now passes readonly={true}
to ChatContainer, which adds the class to the container div.
Fixes#4266
Co-authored-by: Gabe Kangas <gabek@real-ity.com>
* Fix: Fix to show color when user join the chat
* Changes to restore unnecesary changes
* Deleting unnecesary changes
* Identation issues fixed
* fix(js): run prettier against changed code
---------
Co-authored-by: Gabe Kangas <gabek@real-ity.com>