feat: Adds a webhook for when a user follows the stream (#4362)

* feat: Adds a webhook for when a user follow the stream

Frontend:
Adds a checkbox which renders only when social features are enabled.

Backend:
- Defines a new type for the event
- Implements the webhook including unit testing
- Fires the webhook inside the ApproveFollower handler

* Removes unnecessary Type fiels from Events struct

* refactor: renames SendUserFollowedEvent func to FediverseEngagementFollow and fixes linting errors

* fix: fixes unit test to reflect removed Type field from FediverseEngagementFollowEvent

* feat: fires webhook also when manual approvals are not required

* chore: slight cleanup

---------

Co-authored-by: Gabe Kangas <gabek@real-ity.com>
This commit is contained in:
fortyoneplustwo
2025-11-21 13:47:50 -08:00
committed by GitHub
co-authored by Gabe Kangas
parent 9cc58d14c3
commit 80850b15d0
9 changed files with 123 additions and 12 deletions
+2
View File
@@ -12,6 +12,8 @@ const (
UserParted EventType = "USER_PARTED"
// UserNameChanged is the event sent when a chat username change takes place.
UserNameChanged EventType = "NAME_CHANGE"
// FediverseEngagementFollow is the event sent when a user follows the stream.
FediverseEngagementFollow EventType = "FEDIVERSE_ENGAGEMENT_FOLLOW"
// VisibiltyToggled is the event sent when a chat message's visibility changes.
VisibiltyToggled EventType = "VISIBILITY-UPDATE"
// PING is a ping message.