Exemplo n.º 1
0
        public async Task SendAsync(NoticeMessageInput input)
        {
            if (!input.ReceiveId.HasValue && !input.RoadFlowReceiveId.HasValue)
            {
                return;
            }

            long receiveId = 0;

            receiveId = input.ReceiveId.Value;
            if (input.OnlyTip.HasValue && !input.OnlyTip.Value)
            {
                await _noticeManager.SendPrivateMessageAsync(receiveId, input.ProjectId, input.Title, input.Content, input.Link);
            }
            var userId = AbpSession.GetUserId();

            var userIdentifier = AbpSession.ToUserIdentifier();
            var onlineClients  = _onlineClientManager.GetAllClients().Where(p => p.UserId == receiveId).ToList();

            //_noticeCommunicator.SendNoticeToClient(onlineClients, input.ProjectId, input.Title, input.Content, input.Link);
        }
Exemplo n.º 2
0
 public void Send(NoticeMessageInput input)
 {
     AsyncHelper.RunSync(() => SendAsync(input));
 }