mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-24 13:43:12 +02:00
cleanup
This commit is contained in:
parent
40623db4c5
commit
4a7bf165c4
@ -180,32 +180,6 @@ func (ws *Server) BroadcastBlockDelete(blockID string, parentID string) {
|
||||
ws.BroadcastBlockChange(block)
|
||||
}
|
||||
|
||||
/*
|
||||
func (ws *Server) BroadcastBlockDelete1(blockIDs []string) {
|
||||
for _, blockID := range blockIDs {
|
||||
listeners := ws.GetListeners(blockID)
|
||||
log.Printf("%d listener(s) for blockID: %s", len(listeners), blockID)
|
||||
|
||||
if listeners != nil {
|
||||
message := DeleteMsg{
|
||||
Action: "DELETE_BLOCK",
|
||||
BlockID: blockID,
|
||||
}
|
||||
|
||||
for _, listener := range listeners {
|
||||
log.Printf("Broadcast change, blockID: %s, remoteAddr: %s", blockID, listener.RemoteAddr())
|
||||
|
||||
err := listener.WriteJSON(message)
|
||||
if err != nil {
|
||||
log.Printf("broadcast error: %v", err)
|
||||
listener.Close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// BroadcastBlockChange broadcasts update messages to clients
|
||||
func (ws *Server) BroadcastBlockChange(block model.Block) {
|
||||
blockIDsToNotify := []string{block.ID, block.ParentID}
|
||||
|
Loading…
Reference in New Issue
Block a user