Beispiel #1
0
 public void DeleteSingleThreadFromAgentAll(string business_id, string agent_id, string thread_id)
 {
     try
     {
         _counterRepository.DeleteThreadFromAgentsAll(business_id, agent_id, thread_id);
     }
     catch { }
 }
Beispiel #2
0
        public Thread UnAssignFromAgent(string business_id, string thread_id)
        {
            var thread = GetById(business_id, thread_id);

            if (thread == null)
            {
                return(thread);
            }

            string agent_id = thread.agent_id;

            business_id     = thread.business_id;
            thread.agent_id = "";
            thread.status   = "pending";
            CreateThread(thread, true);

            if (string.IsNullOrWhiteSpace(agent_id))
            {
                return(thread);
            }

            //update counters
            var counter = new Counter {
                id = thread_id, count = 1
            };

            try
            {
                _counterRepository.DeleteThreadFromAgentsAll(business_id, agent_id, thread_id);
            }
            catch { }
            try
            {
                _counterRepository.DeleteThreadFromAgentsUnread(business_id, agent_id, thread_id);
            }
            catch { }
            return(thread);
        }