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) }); }
//Used for remind contact public static PushNotification GetMessage(RemindRequestSlim remindReq) { PushNotification pn = new PushNotification(); if (remindReq.EventId != null) { pn.EventId = remindReq.EventId.ToString(); if (!string.IsNullOrEmpty(remindReq.EventName)) { pn.EventName = remindReq.EventName; } } pn.Type = "RemindContact"; pn.InitiatorId = remindReq.RequestorId; pn.InitiatorName = remindReq.RequestorName; return(pn); }