Commit graph

140 commits

Author SHA1 Message Date
Gabe Kangas
ebf64dd17d
fix(chat): do not send chat join message
If a user is already connected to chat from elsewhere, do not send an
additional chat join message. Closes #3487
2024-02-18 15:49:50 -08:00
Aziz Rmadi
b532b1545c
Modified rate limit conditions to exclude moderators (#3534) 2024-01-24 10:27:38 -08:00
Gabe Kangas
8e79e2acfa
chore(go): run betteralign and gofumpt on codebase 2023-10-08 14:22:28 -07:00
Gabe Kangas
169c11596c
feat(chat): add support for chat part messages. Closes #3201 (#3291) 2023-09-10 10:58:11 -07:00
Gabe Kangas
3174eb20e5
fix: updates for new linter rules. Closes #3277 2023-08-25 19:58:44 -07:00
John Regan
dfa3a2a273
chat: check that a new username is different before sending out updates (#3162) 2023-07-10 23:16:36 -07:00
John Regan
46ca5223f9
Chat wire protocol (#3125)
* core: remove file extension from emoji name

* web: transform emotes to labels when sending

* chat: replace br with line break

* core: implement emoji cache

* chat: send shortcodes for custom emoji

* chat: correct esling errors

* core: move emoji injection into dedicated function

* emoji: integrate emoji into markdown renderer, fix formatting

* chat protocol: correct golangci-lint findings

* chat field: specify that the contentEditable is an HTMLElement

* admin: mention that emoji should have unique names

* Prettified Code!

* regenerate pack-lock

* chat: correct the emphasis tag, provide fallback for other elements

---------

Co-authored-by: jprjr <jprjr@users.noreply.github.com>
2023-07-05 17:25:47 -07:00
Gabe Kangas
a354787a9e
feat(chat): support line breaks and pasted content. Closes #3108 2023-06-27 14:51:01 -07:00
Gabe Kangas
d33f117a82
fix(chat): fix missing alt tags on custom emoji. Closes #3106 2023-06-26 11:38:10 -07:00
Gabe Kangas
85e7af3d5f
Update to Go 1.20 + run better align (#2927)
* chore(go): update go version to 1.20. Closes #2185

* chore(go): run better align against project

To optimize struct field order. Closes #2870

* chore(go): update CI jobs to use Go 1.20

* fix(go): linter warnings for Go 1.20 update
2023-05-30 10:31:43 -07:00
Gabe Kangas
521e2d1276
chore(go): updated build tag constraint syntax 2023-04-24 17:49:29 -07:00
Pranav Joglekar
07c5cabfe8
Trigger the title updated webhook event whenever a title is changed (#2823)
* wip: trigger the title updated webhook event whenever a title is changed

* Commit updated API documentation

* fix: add STREAM_TITLE_CHANGED to list of valid events

* feat: Add support for STREAM_TITLE_CHANGED webhook event on admin dashboard

* fix: transmit webhook event after stream has changed to fix race conditions where older title was sent

---------

Co-authored-by: Owncast <owncast@owncast.online>
2023-03-28 11:34:00 -07:00
Gabe Kangas
604e1fdbaa
Increase timeout between join messages from 5 to 10 minutes 2023-03-21 17:19:38 -07:00
Gabe Kangas
2364293742
Remove unused event and comments on block 2023-03-13 15:11:51 -07:00
Gabe Kangas
0c03773c4c
Sanitize+truncate display names on registration+change. For #2527 2022-12-29 14:13:22 -08:00
Gabe Kangas
3abc7a3ab8
Expose connected client ID to moderator client info api 2022-12-13 19:17:32 -08:00
Gabe Kangas
0ecaf11a25
Merge remote-tracking branch 'origin/develop' into webv2 2022-11-29 16:37:29 -08:00
Philipp
56a3f350ee
Chat name & color modal (#2347)
* Improve name & color change modal design

* Resend user info after color change

That way the name change dialog shows the correct
color when opening it the next time

* Name change modal: allow overflow of color picker

* Allow submitting form only if button is enabled

* Prettified Code!

* Make button & text input same height

Co-authored-by: xarantolus <xarantolus@users.noreply.github.com>
2022-11-23 10:52:39 -08:00
M. Ajmal Moochingal
23b6e5868d
Using prepared statements for SQL queries. (#2257)
* using prepared statements for sql query for fixing sql injection

* returning error in getChat instead of logging
2022-10-28 12:32:42 -07:00
Gabe Kangas
c844e98a19
Merge remote-tracking branch 'origin/develop' into webv2 2022-10-12 16:52:05 -07:00
Matthew Donoughe
10055664bb
add tests for webhook events (#2180)
* add tests for webhook events

* atomic.Uint32 is not in Go 1.18
2022-10-09 22:55:54 -07:00
Gabe Kangas
7fb97c56aa
Merge remote-tracking branch 'origin/develop' into webv2 2022-10-02 21:44:06 -07:00
Gabe Kangas
99d034b1a5
Replace -> ReplaceAll 2022-09-21 10:24:16 -07:00
Matt Owens
5dafdb479d
Sanitize user submitted values before logging (#2134)
* strip line breaks from user-submitted values before logging

* finish comment
2022-09-21 10:03:16 -07:00
Gabe Kangas
dac42a2da8
Merge remote-tracking branch 'origin/develop' into webv2 2022-08-15 23:25:08 -07:00
Gabe Kangas
d32d741abf
Limit chat display names to 30 characters. Closes #1919 2022-08-14 18:09:16 -07:00
Gabe Kangas
68414445c2
Add support for changing user color in name modal. Closes #1805 2022-08-09 19:56:45 -07:00
Gabe Kangas
d12f25f556
Merge branch 'develop' into webv2 2022-08-09 14:14:45 -07:00
Gabe Kangas
c40eaa47e9
Force origin test to always pass. Closes #2003 2022-08-02 13:04:23 -07:00
Gabe Kangas
f3a16be0dd
Add user detail API + modal. Closes #2002 2022-07-20 22:36:20 -07:00
Gabe Kangas
1d213b71d4
Support changing your own name and handling name change events 2022-05-26 13:52:04 -07:00
Gabe Kangas
715504eb69
Merge remote-tracking branch 'origin/develop' into webv2 2022-05-25 22:57:14 -07:00
Meisam
482e1a705a
clarify the message for registered usernames (#1909) 2022-05-16 13:05:00 -07:00
Gabe Kangas
21b82ebb2c
Fix invalid field name 2022-05-08 15:28:06 -07:00
Gabe Kangas
8b07eb7457
Render chat messages that come over the socket 2022-05-03 13:01:50 -07:00
Gabe Kangas
15becc5121
Connect to websocket and start accepting messages 2022-05-02 22:13:36 -07:00
Gabe Kangas
2c47ddeef0
Optimize chat history query. Helps #1890 2022-05-01 00:07:33 -07:00
Gabe Kangas
339d596fd3
Reduce the amount of chat backlog we keep. 2022-04-29 18:30:54 -07:00
Gabe Kangas
b835de2dc4
IndieAuth support (#1811)
* Able to authenticate user against IndieAuth. For #1273

* WIP server indieauth endpoint. For https://github.com/owncast/owncast/issues/1272

* Add migration to remove access tokens from user

* Add authenticated bool to user for display purposes

* Add indieauth modal and auth flair to display names. For #1273

* Validate URLs and display errors

* Renames, cleanups

* Handle relative auth endpoint paths. Add error handling for missing redirects.

* Disallow using display names in use by registered users. Closes #1810

* Verify code verifier via code challenge on callback

* Use relative path to authorization_endpoint

* Post-rebase fixes

* Use a timestamp instead of a bool for authenticated

* Propertly handle and display error in modal

* Use auth'ed timestamp to derive authenticated flag to display in chat

* don't redirect unless a URL is present

avoids redirecting to `undefined` if there was an error

* improve error message if owncast server URL isn't set

* fix IndieAuth PKCE implementation

use SHA256 instead of SHA1, generates a longer code verifier (must be 43-128 chars long), fixes URL-safe SHA256 encoding

* return real profile data for IndieAuth response

* check the code verifier in the IndieAuth server

* Linting

* Add new chat settings modal anad split up indieauth ui

* Remove logging error

* Update the IndieAuth modal UI. For #1273

* Add IndieAuth repsonse error checking

* Disable IndieAuth client if server URL is not set.

* Add explicit error messages for specific error types

* Fix bad logic

* Return OAuth-keyed error responses for indieauth server

* Display IndieAuth error in plain text with link to return to main page

* Remove redundant check

* Add additional detail to error

* Hide IndieAuth details behind disclosure details

* Break out migration into two steps because some people have been runing dev in production

* Add auth option to user dropdown

Co-authored-by: Aaron Parecki <aaron@parecki.com>
2022-04-21 14:55:26 -07:00
funkyhippo
79ca6e04f3
Eliminate client close deadlocks. (#1833) 2022-04-15 19:30:05 -07:00
David
9983ef2794
[fix] improve custom emoji validation (#1772) 2022-03-08 13:03:37 -08:00
Gabe Kangas
e0a75d5d54
Add support for established chat user mode. #1587 (#1681)
* Add support for established user mode. #1587

* Tweak tests

* Tweak tests

* Update test

* Fix test.
2022-03-06 23:26:24 -08:00
Gabe Kangas
19b9a8bdf6
Add support for IP-based bans (#1703)
* Add support for IP-based bans. Closes #1534

* Linter cleanup
2022-03-06 20:34:49 -08:00
Gabe Kangas
78c27ddbdd
Add an icon for bot messages. Closes #1172 (#1729) 2022-03-06 20:09:55 -08:00
Gabe Kangas
92041c4c23
Add Prometheus for some Owncast metrics (#1744)
* Add Prometheus for some Owncast metrics. Closes #1303

* Wrap prometheus metrics endpoint in admin middleware
2022-03-06 17:26:52 -08:00
Gabe Kangas
d5a6267b1f
Add support to disable chat join messages. Closes #1582 (#1743) 2022-03-05 22:34:06 -08:00
Gabe Kangas
8bc40486f8
Quiet, linter 2022-01-27 14:58:31 -08:00
Gabe Kangas
e4b1217af8
Do not return clientID in chat history API. Closes #1547 2022-01-25 20:13:41 -08:00
Gabe Kangas
88b20803b7
Add missing link to chat payload. Closes #1692 2022-01-24 14:56:32 -08:00
Gabe Kangas
3b0dafba9a
Return error in API response. Return all fields in message+user query 2022-01-18 15:38:23 -08:00