void Events_AfterCreate(PublicApi.PollAfterCreateEventArgs e) { if (e.IsEnabled) { var story = GetStory(e.Id); if (story == null) { _storyController.Create(new ActivityStoryCreateOptions { ContentId = e.ContentId, ContentTypeId = PublicApi.Polls.ContentTypeId, LastUpdate = DateTime.UtcNow, Actors = new List <ActivityStoryActor> { new ActivityStoryActor { UserId = e.AuthorUserId, Verb = "Add", Date = DateTime.UtcNow } } }); } } }
void Events_AfterCreate(PublicApi.PollAfterCreateEventArgs e) { if (_hashTagController != null) { _hashTagController.AddUpdateHashTags(e.ContentId, "Description", e.Description("raw")); var tags = _hashTagController.GetHashTagsInUnRenderedHtml(e.Name); if (tags != null && tags.Length > 0) { TEApi.Tags.Add(e.ContentId, e.ContentTypeId, null, string.Join(",", tags)); var name = _hashTagController.FormatHashTagsInUnRenderedHtml(e.Name); PublicApi.Polls.Update(e.Id, name); } } if (_mentionController != null) { _mentionController.AddUpdateLoggedMentions(e.ContentId, "Description", e.Description("raw")); } }