Пример #1
0
 private async void OnMessageDelivered(DeliveryNotification notification)
 {
     var changed = await messageRepository.UpdateMessageStatusAsync(notification.MessageToken, MessageStatus.Delivered);
     await messagingService.MessageDeliveredStatusAcknowledge(new MessageDeliveredStatusAcknowledgeRequest { Messages = new List<Guid> { notification.EventId } });
     if (changed)
     {
         MessageStatusChanged(this, new MessageStatusEventArgs { MessageToken = notification.MessageToken, Status = MessageStatus.Delivered});
     }
 }
Пример #2
0
        private static async void MessagingServiceOnDeliveryNotification(DeliveryNotification notification)
        {
            Out.WriteLine("   opponent received your message");
            await messagingService.MessageDeliveredStatusAcknowledge(
                new MessageDeliveredStatusAcknowledgeRequest { Messages = new List<Guid> { notification.EventId }});
	    }