mirror of
https://github.com/owncast/owncast.git
synced 2024-11-23 05:14:20 +03:00
b43c5e674e
* Rework how hiding messages work. Fixes #1350 * Remove unused function * Revert to old event name to support previously saved webhooks
21 lines
533 B
Go
21 lines
533 B
Go
package events
|
|
|
|
// SetMessageVisibilityEvent is the event fired when one or more message
|
|
// visibilities are changed.
|
|
type SetMessageVisibilityEvent struct {
|
|
Event
|
|
UserMessageEvent
|
|
MessageIDs []string
|
|
Visible bool
|
|
}
|
|
|
|
// GetBroadcastPayload will return the object to send to all chat users.
|
|
func (e *SetMessageVisibilityEvent) GetBroadcastPayload() EventPayload {
|
|
return EventPayload{
|
|
"type": VisibiltyUpdate,
|
|
"id": e.ID,
|
|
"timestamp": e.Timestamp,
|
|
"ids": e.MessageIDs,
|
|
"visible": e.Visible,
|
|
}
|
|
}
|