private void NotifyCategoryAdded(string category, string page) { WikiNotifyClient.SendNoticeAsync( SecurityContext.CurrentAccount.ID.ToString(), Constants.AddPageToCat, category, null, GetCategoryNotifyTags(category, page)); }
private void NotifyCommentCreated(Page page, Comment comment) { WikiNotifyClient.SendNoticeAsync( SecurityContext.CurrentAccount.ID.ToString(), Constants.EditPage, PageNameUtil.ReplaceSpaces(page.PageName), null, GetNotifyTags(page.PageName, "new wiki page comment", comment)); }
private void NotifyPageEdited(Page page) { WikiNotifyClient.SendNoticeAsync( SecurityContext.CurrentAccount.ID.ToString(), Constants.EditPage, PageNameUtil.ReplaceSpaces(page.PageName), null, GetNotifyTags(page.PageName, "edit wiki page", null)); }
private void NotifyPageCreated(Page page) { WikiNotifyClient.SendNoticeAsync( SecurityContext.CurrentAccount.ID.ToString(), Constants.NewPage, null, null, GetNotifyTags(page.PageName)); }
private void NotifyCommentCreated(Page page, Comment comment) { WikiNotifyClient.SendNoticeAsync( SecurityContext.CurrentAccount.ID.ToString(), Constants.EditPage, PageNameUtil.Encode(page.PageName), null, GetNotifyTags(page.PageName, "new wiki page comment", comment)); WikiActivityPublisher.AddPageComment(page, comment); }
private void NotifyPageEdited(Page page) { WikiNotifyClient.SendNoticeAsync( SecurityContext.CurrentAccount.ID.ToString(), Constants.EditPage, PageNameUtil.Encode(page.PageName), null, GetNotifyTags(page.PageName, "edit wiki page", null)); WikiActivityPublisher.EditPage(page); }
private void NotifyCommentCreated(Page page, Comment comment) { var mentionedUsers = MentionProvider.GetMentionedUsers(comment.Body); var mentionedUserIds = mentionedUsers.Select(u => u.ID.ToString()); var provider = WikiNotifySource.Instance.GetSubscriptionProvider(); var authorID = SecurityContext.CurrentAccount.ID.ToString(); var objectID = PageNameUtil.ReplaceSpaces(page.PageName); var recipients = provider .GetRecipients(Constants.EditPage, objectID) .Where(r => !mentionedUserIds.Contains(r.ID)) .ToArray(); var tags = GetNotifyTags(page.PageName, "new wiki page comment", comment); WikiNotifyClient.SendNoticeToAsync(authorID, Constants.EditPage, objectID, recipients, tags); if (mentionedUsers.Length > 0) { WikiNotifyClient.SendNoticeToAsync(authorID, Constants.MentionForWikiComment, objectID, mentionedUsers, tags); } }