feat: add customer online status to conversation response and update UI accordingly
This commit is contained in:
@@ -386,6 +386,14 @@ func (s *wsService) PublishToTopics(topics []string, event RealtimeEvent) {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *wsService) IsVisitorOnline(visitorID string) bool {
|
||||
visitorID = strings.TrimSpace(visitorID)
|
||||
if visitorID == "" {
|
||||
return false
|
||||
}
|
||||
return s.manager.HasTopic(s.visitorTopic(visitorID))
|
||||
}
|
||||
|
||||
func (s *wsService) routeConversationTopics(conversation *models.Conversation) []string {
|
||||
if conversation == nil {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user