154 Commits

Author SHA1 Message Date
a0066fcf54 Fix all golangci-lint warnings surfaced by v2.4.0 (#4567)
* Initial plan

* Fix all golangci-lint warnings (21 issues resolved)

Co-authored-by: gabek <414923+gabek@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gabek <414923+gabek@users.noreply.github.com>
2025-09-25 20:03:40 -07:00
8eb8bdc18b Stop using empty/whitespace as chat display names (#4553)
* fix(chat): fixes #4522 to stop people from setting invalid display names

* fix(chat): also guard against non-ascii whitespace like non breaking space

* Update web/utils/displayNameValidation.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: handle additional whitespace

* Update web/utils/displayNameValidation.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Javascript formatting autofixes

* fix: deduplicate running of validation

* fix: fix error with useMemo

* Update web/utils/displayNameValidation.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update web/utils/displayNameValidation.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Javascript formatting autofixes

* fix: fix component rendering issue

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Owncast <owncast@owncast.online>
2025-09-15 13:37:39 -07:00
92d1b79a80 fix(chat): fix emoji rendering as text. Fixes #4287 2025-04-23 18:13:29 -07:00
4b627f0693 chore(go): migrate more models to codegen versions. For #3778 2025-02-12 21:18:47 -08:00
c1f4096e11 chore(go): new chat message db repository. Closes #3081 (#4161) 2025-01-20 16:32:25 -08:00
0b5d7c8a4d Config repository (#3988)
* WIP

* fix(test): fix ap test failing

* fix: fix unkeyed fields being used

* chore(tests): clean up browser tests by splitting out federation UI tests
2024-11-15 19:20:58 -08:00
3050d64909 fix(go): fix type conversion for windows 2024-09-17 19:11:16 -07:00
6d768f0b0a fix(go): fix type conversions for FreeBSD and Windows methods 2024-09-17 08:28:01 -07:00
7a65e6d808 fix(go): int64 -> uint64 for connection limit value 2024-09-17 08:12:09 -07:00
4c4bc90460 fix(deps): update module mvdan.cc/xurls to v2 (#3815)
* fix(deps): update module mvdan.cc/xurls to v2

* mvdan/xurls 2.x bump fixes (#3823)

* Bump xurls import to v2

* Change Strict to function calls, v2.0.0 change

* Add go.sum entry for xurls/v2

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: mahmed2000 <mahmad2000@protonmail.com>
2024-07-08 11:24:48 -07:00
c963512934 chore: move geoip into services directory 2024-07-02 21:26:43 -07:00
4c64fa26ac fixing grammar (#3801)
I guess California no speak english
2024-07-02 11:55:25 -07:00
2ccd3aad87 User repository (#3795)
* It builds with the new user repository

* fix(test): fix broken test

* fix(api): fix registration endpoint that was broken after the change

* fix(test): update test to reflect new user repository

* fix: use interface type instead of concrete type

* fix: restore commented out code
2024-07-01 18:58:50 -07:00
a450e62397 Optionally disable chat rate limiter and add optional chat slur/language filter (#3681)
* feat(chat): basic profanity filter. For #3139

* feat(chat): add setting for disabling chat spam protection. Closes #3523

* feat(chat): wire up the new chat slur filter to admin and chat. Closes #3139
2024-04-09 22:25:41 -07:00
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
b532b1545c Modified rate limit conditions to exclude moderators (#3534) 2024-01-24 10:27:38 -08:00
8e79e2acfa chore(go): run betteralign and gofumpt on codebase 2023-10-08 14:22:28 -07:00
169c11596c feat(chat): add support for chat part messages. Closes #3201 (#3291) 2023-09-10 10:58:11 -07:00
3174eb20e5 fix: updates for new linter rules. Closes #3277 2023-08-25 19:58:44 -07:00
dfa3a2a273 chat: check that a new username is different before sending out updates (#3162) 2023-07-10 23:16:36 -07:00
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
a354787a9e feat(chat): support line breaks and pasted content. Closes #3108 2023-06-27 14:51:01 -07:00
d33f117a82 fix(chat): fix missing alt tags on custom emoji. Closes #3106 2023-06-26 11:38:10 -07:00
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
521e2d1276 chore(go): updated build tag constraint syntax 2023-04-24 17:49:29 -07:00
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
604e1fdbaa Increase timeout between join messages from 5 to 10 minutes 2023-03-21 17:19:38 -07:00
2364293742 Remove unused event and comments on block 2023-03-13 15:11:51 -07:00
0c03773c4c Sanitize+truncate display names on registration+change. For #2527 2022-12-29 14:13:22 -08:00
3abc7a3ab8 Expose connected client ID to moderator client info api 2022-12-13 19:17:32 -08:00
0ecaf11a25 Merge remote-tracking branch 'origin/develop' into webv2 2022-11-29 16:37:29 -08:00
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
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
c844e98a19 Merge remote-tracking branch 'origin/develop' into webv2 2022-10-12 16:52:05 -07:00
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
7fb97c56aa Merge remote-tracking branch 'origin/develop' into webv2 2022-10-02 21:44:06 -07:00
99d034b1a5 Replace -> ReplaceAll 2022-09-21 10:24:16 -07:00
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
dac42a2da8 Merge remote-tracking branch 'origin/develop' into webv2 2022-08-15 23:25:08 -07:00
d32d741abf Limit chat display names to 30 characters. Closes #1919 2022-08-14 18:09:16 -07:00
68414445c2 Add support for changing user color in name modal. Closes #1805 2022-08-09 19:56:45 -07:00
d12f25f556 Merge branch 'develop' into webv2 2022-08-09 14:14:45 -07:00
c40eaa47e9 Force origin test to always pass. Closes #2003 2022-08-02 13:04:23 -07:00
f3a16be0dd Add user detail API + modal. Closes #2002 2022-07-20 22:36:20 -07:00
1d213b71d4 Support changing your own name and handling name change events 2022-05-26 13:52:04 -07:00
715504eb69 Merge remote-tracking branch 'origin/develop' into webv2 2022-05-25 22:57:14 -07:00
482e1a705a clarify the message for registered usernames (#1909) 2022-05-16 13:05:00 -07:00
21b82ebb2c Fix invalid field name 2022-05-08 15:28:06 -07:00
8b07eb7457 Render chat messages that come over the socket 2022-05-03 13:01:50 -07:00
15becc5121 Connect to websocket and start accepting messages 2022-05-02 22:13:36 -07:00