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") }); }
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) }); }
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") }); } }
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") }); } }
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") }); }
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) }); }); }