focalboard/server/ws/common.go
Doug Lauder 75bd409ba0
Notifications phase 1 (#1851)
Backend support for subscribing/unsubscribing to blocks, typically cards and boards. Notifies subscribers when changes are made to cards they are subscribed to.
2021-12-10 10:46:37 -05:00

27 lines
699 B
Go

package ws
import (
"github.com/mattermost/focalboard/server/model"
)
// UpdateMsg is sent on block updates.
type UpdateMsg struct {
Action string `json:"action"`
Block model.Block `json:"block"`
}
// UpdateSubscription is sent on subscription updates.
type UpdateSubscription struct {
Action string `json:"action"`
Subscription *model.Subscription `json:"subscription"`
}
// WebsocketCommand is an incoming command from the client.
type WebsocketCommand struct {
Action string `json:"action"`
WorkspaceID string `json:"workspaceId"`
Token string `json:"token"`
ReadToken string `json:"readToken"`
BlockIDs []string `json:"blockIds"`
}