Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Fix incorrect webhook payload being sent in the new SetMessageVisibilityEvent

Gabe Kangas61e6597c7d4c
diff --git a/core/chat/events/setMessageVisibilityEvent.go b/core/chat/events/setMessageVisibilityEvent.go
index 965b983616..6d82d6b0ae 100644
--- a/core/chat/events/setMessageVisibilityEvent.go
+++ b/core/chat/events/setMessageVisibilityEvent.go
@@ -19,3 +19,8 @@ func (e *SetMessageVisibilityEvent) GetBroadcastPayload() EventPayload {
"visible": e.Visible,
}
}
+
+// GetMessageType will return the event type for this message.
+func (e *SetMessageVisibilityEvent) GetMessageType() EventType {
+ return VisibiltyUpdate
+}
diff --git a/core/chat/messages.go b/core/chat/messages.go
index 33f302be24..c5a4b26556 100644
--- a/core/chat/messages.go
+++ b/core/chat/messages.go
@@ -31,7 +31,7 @@ func SetMessagesVisibility(messageIDs []string, visibility bool) error {
// Send webhook
wh := webhooks.WebhookEvent{
- EventData: event,
+ EventData: payload,
Type: event.GetMessageType(),
}