Fix incorrect webhook payload being sent in the new SetMessageVisibilityEvent
This commit is contained in:
@@ -19,3 +19,8 @@ func (e *SetMessageVisibilityEvent) GetBroadcastPayload() EventPayload {
|
|||||||
"visible": e.Visible,
|
"visible": e.Visible,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetMessageType will return the event type for this message.
|
||||||
|
func (e *SetMessageVisibilityEvent) GetMessageType() EventType {
|
||||||
|
return VisibiltyUpdate
|
||||||
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ func SetMessagesVisibility(messageIDs []string, visibility bool) error {
|
|||||||
|
|
||||||
// Send webhook
|
// Send webhook
|
||||||
wh := webhooks.WebhookEvent{
|
wh := webhooks.WebhookEvent{
|
||||||
EventData: event,
|
EventData: payload,
|
||||||
Type: event.GetMessageType(),
|
Type: event.GetMessageType(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user