Beispiel #1
0
        public async Task <IHttpActionResult> UnreadMessageCount(ChatThreadRequestModel request)
        {
            var recipient = SecurityPrincipal.Current;

            var count = await _communicationsService.UnreadMessageCount(request.StudentUsi, recipient.PersonUniqueId, recipient.PersonTypeId, request.SenderUniqueId, request.SenderTypeId);

            return(Ok(count));
        }
Beispiel #2
0
        public async Task <IHttpActionResult> GetChatThread(ChatThreadRequestModel request)
        {
            var sender = SecurityPrincipal.Current;

            var model = await _communicationsService.GetConversationAsync(request.StudentUsi, sender.PersonUniqueId, sender.PersonTypeId, request.RecipientUniqueId, request.RecipientTypeId, request.RowsToSkip, request.UnreadMessageCount);

            if (model == null)
            {
                return(NotFound());
            }

            return(Ok(model));
        }