コード例 #1
0
 public void NotifyEndEvent(EventSlim evt)
 {
     _taskQueue.Enqueue(new
     {
         RegistrationIds = evt.UserList.Where(user =>
                                              !_isRequester(user.UserId, evt.InitiatorId.ToString()) &&
                                              _isValidGCMId(user.GCMClientId)).Select(user => user.GCMClientId),
         NotificationData = PushMessageComposer.GetMessage(evt, "EventEnd")
     });
 }
コード例 #2
0
 public void NotifyRemindContact(RemindRequestSlim remindReq)
 {
     _taskQueue.Enqueue(new
     {
         RegistrationIds = remindReq.ParticipantsForReminder.Where(user =>
                                                                   !_isRequester(user.UserId, remindReq.RequestorId.ToString()) &&
                                                                   _isValidGCMId(user.GCMClientId)).Select(user => user.GCMClientId),
         NotificationData = PushMessageComposer.GetMessage(remindReq)
     });
 }
コード例 #3
0
 public void NotifyRemoveParticipantFromEvent(EventSlim evt, List <string> removedParticipantGcms)
 {
     if (removedParticipantGcms.Count != 0)
     {
         _taskQueue.Enqueue(new
         {
             RegistrationIds  = removedParticipantGcms.Where(user => _isValidGCMId(user)),
             NotificationData = PushMessageComposer.GetMessage(evt, "RemovedFromEvent")
         });
     }
 }
コード例 #4
0
 public void NotifyAddParticipantToEvent(EventSlim evt, List <string> adddedParticipantGcms)
 {
     if (adddedParticipantGcms.Count != 0)
     {                //Notify newly added users of event invitation
         _taskQueue.Enqueue(new
         {
             RegistrationIds  = adddedParticipantGcms.Where(user => _isValidGCMId(user)),
             NotificationData = PushMessageComposer.GetMessage(evt, "EventInvite")
         });
     }
 }
コード例 #5
0
 public void NotifyEventUpdateParticipants(EventSlim evt, List <string> removedParticipantsGcms)
 {
     _taskQueue.Enqueue(new
     {
         RegistrationIds = evt.UserList.Where(user =>
                                              !_isRequester(user.UserId, evt.InitiatorId.ToString()) &&
                                              !_isParticipantRemoved(removedParticipantsGcms, user.GCMClientId) &&
                                              _isValidGCMId(user.GCMClientId)).Select(user => user.GCMClientId),
         NotificationData = PushMessageComposer.GetMessage(evt, "EventUpdateParticipants")
     });
 }
コード例 #6
0
        public void NotifyAdditionalRegisteredUserInfoToHost(List <EventParticipantSlim> additionalRegisteredUsers, EventSlim evt)
        {
            var registrationIds = evt.UserList.Where(user =>
                                                     _isRequester(user.UserId, evt.InitiatorId.ToString()) &&
                                                     _isValidGCMId(user.GCMClientId)).Select(user => user.GCMClientId);

            additionalRegisteredUsers.ForEach(x =>
            {
                _taskQueue.Enqueue(new { RegistrationIds = registrationIds, NotificationData = PushMessageComposer.GetMessage("RegisteredUserUpdate", x.UserId, x.MobileNumberStoredInRequestorPhone) });
            });
        }