Add excalidraw as submodule

This commit is contained in:
patwie
2024-03-29 13:53:53 +00:00
parent 31c8029402
commit 3893dfb13e
5 changed files with 31 additions and 7 deletions
+6 -4
View File
@@ -22,12 +22,13 @@ import (
type (
UserToFollow struct {
SocketId string
Username string
SocketId string `json:"socketId"`
Username string `json:"username"`
}
OnUserFollowedPayload struct {
UserToFollow UserToFollow
action string
UserToFollow UserToFollow `json:"userToFollow"`
Action string `json:"action"` // "FOLLOW" | "UNFOLLOW"
}
)
@@ -72,6 +73,7 @@ func setupSocketIO() *socketio.Server {
Credentials: true,
})
ioo := socketio.NewServer(nil, opts)
ioo.On("connection", func(clients ...any) {
socket := clients[0].(*socketio.Socket)
ioo.To(socketio.Room(socket.Id())).Emit("init-room")