Example #1
0
        public bool Block(string business_id, string id)
        {
            var  customer = _customerService.GetById(business_id, id);
            bool blocked  = !customer.blocked;

            if (blocked)
            {
                foreach (var bc in _channelService.GetChannels(business_id, 0, 100).Result.Where(c => c.active))
                {
                    _facebookService.BlockUserFromPage(bc.ext_id, customer.app_id, bc.token);
                }
                _customerService.Block(business_id, id, blocked);
                return(true);
            }
            return(false);
        }