Пример #1
0
        private string GetInboxLink(string business_id, Thread thread)
        {
            string link = "";

            try
            {
                if (!string.IsNullOrWhiteSpace(thread.ext_id))
                {
                    string conversation_id = ConversationService.FormatId(business_id, thread.ext_id);
                    var    conversation    = _conversationService.GetById(business_id, conversation_id);
                    if (conversation != null && !string.IsNullOrWhiteSpace(conversation.link))
                    {
                        link = "https://business.facebook.com" + conversation.link;
                    }
                }
            }
            catch { }
            if (string.IsNullOrWhiteSpace(link))
            {
                link = string.Format("https://business.facebook.com/{0}/messages/?folder=inbox&section=messages", thread.channel_ext_id);
            }
            return(link);
        }