From 3d6d513ba97ef599dab88bf8f2af488f3abed252 Mon Sep 17 00:00:00 2001 From: Abhinav Raut Date: Mon, 29 Jul 2024 04:03:19 +0530 Subject: [PATCH] more commits. --- cmd/handlers.go | 3 - .../conversation/ConversationSideBar.vue | 1 - .../src/components/message/MessageList.vue | 33 +++++--- frontend/src/stores/conversation.js | 18 +++-- frontend/src/websocket.js | 3 - internal/conversation/conversation.go | 80 +++++++++---------- internal/conversation/message.go | 5 +- internal/conversation/queries.sql | 2 +- internal/ws/ws.go | 4 +- 9 files changed, 80 insertions(+), 69 deletions(-) diff --git a/cmd/handlers.go b/cmd/handlers.go index ccbb4448..10dffcfd 100644 --- a/cmd/handlers.go +++ b/cmd/handlers.go @@ -21,7 +21,6 @@ func initHandlers(g *fastglue.Fastglue, hub *ws.Hub) { g.GET("/api/conversations/all", auth(handleGetAllConversations, "conversation:all")) g.GET("/api/conversations/team", auth(handleGetTeamConversations, "conversation:team")) g.GET("/api/conversations/assigned", auth(handleGetAssignedConversations, "conversation:assigned")) - g.GET("/api/conversations/{uuid}", auth(handleGetConversation)) g.GET("/api/conversations/{uuid}/participants", auth(handleGetConversationParticipants)) g.PUT("/api/conversations/{uuid}/last-seen", auth(handleUpdateAssigneeLastSeen)) @@ -30,8 +29,6 @@ func initHandlers(g *fastglue.Fastglue, hub *ws.Hub) { g.PUT("/api/conversations/{uuid}/priority", auth(handleUpdatePriority, "conversation:edit_priority")) g.PUT("/api/conversations/{uuid}/status", auth(handleUpdateStatus, "conversation:edit_status")) g.POST("/api/conversations/{uuid}/tags", auth(handleAddConversationTags)) - - // Message. g.GET("/api/conversations/{uuid}/messages", auth(handleGetMessages)) g.GET("/api/message/{uuid}/retry", auth(handleRetryMessage)) g.GET("/api/message/{uuid}", auth(handleGetMessage)) diff --git a/frontend/src/components/conversation/ConversationSideBar.vue b/frontend/src/components/conversation/ConversationSideBar.vue index bfbd75cd..5503d4ba 100644 --- a/frontend/src/components/conversation/ConversationSideBar.vue +++ b/frontend/src/components/conversation/ConversationSideBar.vue @@ -41,7 +41,6 @@ ? (() => { console.log(' ->', conversationStore.conversation.data.assigned_user_id , 'agents ', agents) const agent = agents.find(agent => agent.id === conversationStore.conversation.data.assigned_user_id); - console.log('Foud agent ', agent) return agent ? `${agent.first_name} ${agent.last_name}` : "Select agent..."; })() : "Select agent..." diff --git a/frontend/src/components/message/MessageList.vue b/frontend/src/components/message/MessageList.vue index 00c4934e..2462f372 100644 --- a/frontend/src/components/message/MessageList.vue +++ b/frontend/src/components/message/MessageList.vue @@ -1,9 +1,13 @@