Skip to content

Commit

Permalink
feat: change message action type
Browse files Browse the repository at this point in the history
  • Loading branch information
barabobBOB committed May 21, 2024
1 parent 5b86eff commit 92da221
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
3 changes: 0 additions & 3 deletions cmd/server/handler/chat_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ func NewChatController(
upgrader: websocket.Upgrader{
ReadBufferSize: 4096,
WriteBufferSize: 4096,
//CheckOrigin: func(r *http.Request) bool {
// return true
//},
},
authService: authService,
chatService: chatService,
Expand Down
12 changes: 6 additions & 6 deletions internal/chat/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
)

const (
SendMessageAction = "send-message"
JoinRoomAction = "join-room"
LeaveRoomAction = "leave-room"
UserJoinedAction = "user-join"
UserLeftAction = "user-left"
RoomJoinedAction = "room-joined"
SendMessageAction = "SEND_MESSAGE"
JoinRoomAction = "JOIN_ROOM"
LeaveRoomAction = "LEAVE_ROOM"
UserJoinedAction = "USER_JOIN"
UserLeftAction = "USER_LEFT"
RoomJoinedAction = "ROOM_JOINED"
)

type Message struct {
Expand Down

0 comments on commit 92da221

Please sign in to comment.