Browse Source

Fix incorrect webhook payload being sent in the new SetMessageVisibilityEvent

pull/1531/head
Gabe Kangas 4 years ago
parent
commit
c9f8133507
  1. 5
      core/chat/events/setMessageVisibilityEvent.go
  2. 2
      core/chat/messages.go

5
core/chat/events/setMessageVisibilityEvent.go

@ -19,3 +19,8 @@ func (e *SetMessageVisibilityEvent) GetBroadcastPayload() EventPayload { @@ -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
}

2
core/chat/messages.go

@ -31,7 +31,7 @@ func SetMessagesVisibility(messageIDs []string, visibility bool) error { @@ -31,7 +31,7 @@ func SetMessagesVisibility(messageIDs []string, visibility bool) error {
// Send webhook
wh := webhooks.WebhookEvent{
EventData: event,
EventData: payload,
Type: event.GetMessageType(),
}

Loading…
Cancel
Save