mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
20 lines
463 B
Go
20 lines
463 B
Go
package chat
|
|
|
|
import "github.com/owncast/owncast/models"
|
|
|
|
// UserPartEvent is the event fired when a user leaves chat.
|
|
type UserPartEvent struct {
|
|
models.Event
|
|
models.UserEvent
|
|
}
|
|
|
|
// GetBroadcastPayload will return the object to send to all chat users.
|
|
func (e *UserPartEvent) GetBroadcastPayload() models.EventPayload {
|
|
return models.EventPayload{
|
|
"type": models.UserParted,
|
|
"id": e.ID,
|
|
"timestamp": e.Timestamp,
|
|
"user": e.User,
|
|
}
|
|
}
|