Exemplo n.º 1
0
        public ActionResult InviteMember(MemberGroupInviteModel invite)
        {
            InviteUser(invite);
            SendInvitationToUser(invite);

            return(new HttpStatusCodeResult(OK));
        }
Exemplo n.º 2
0
        public async Task <IHttpActionResult> InviteMember(MemberGroupInviteModel invite)
        {
            await InviteUser(invite);

            SendInvitationToUser(invite);

            return(Ok());
        }
Exemplo n.º 3
0
 private void SendInvitationToUser(MemberGroupInviteModel invite) =>
 _notificationsService.ProcessNotification(new NotifierData
 {
     NotificationType = NotificationTypeEnum.GroupInvitation,
     ReceiverIds      = List(invite.MemberId),
     ActivityType     = CommunicationTypeEnum.CommunicationSettings,
     Value            = _notifierDataHelper.GetGroupInvitationDataModel(NotificationTypeEnum.GroupInvitation, invite.GroupId, invite.MemberId,
                                                                        _intranetMemberService.GetCurrentMember().Id)
 });
Exemplo n.º 4
0
 private async Task InviteUser(MemberGroupInviteModel invite) =>
 await _groupMemberService.AddAsync(invite.GroupId, new GroupMemberSubscriptionModel
 {
     MemberId = invite.MemberId
 });
Exemplo n.º 5
0
 private void InviteUser(MemberGroupInviteModel invite) =>
 _groupMemberService.Add(invite.GroupId, new GroupMemberSubscriptionModel
 {
     MemberId = invite.MemberId
 });
Exemplo n.º 6
0
        private void UpdateCache(MemberGroupInviteModel invite)
        {
            var casted = _intranetMemberService as IntranetMemberService <IntranetMember>;

            casted.UpdateMemberCache(invite.MemberId);
        }