private async Task OnNewsCreatedAsync(Guid activityId, NewsCreateModel model) { var news = _newsService.Get(activityId); if (model.GroupId.HasValue) { await _groupActivityService.AddRelationAsync(model.GroupId.Value, activityId); news.GroupId = model.GroupId.Value; } await _activityTagsHelper.ReplaceTagsAsync(activityId, model.TagIdsData); await ResolveMentionsAsync(model.Description, news); }
private async Task OnBulletinCreatedAsync(SocialBase social, SocialCreateModel model) { if (model.GroupId.HasValue) { await _groupActivityService.AddRelationAsync(model.GroupId.Value, social.Id); } var extendedBulletin = _socialService.Get(social.Id); extendedBulletin.GroupId = model.GroupId; await _activityTagsHelper.ReplaceTagsAsync(social.Id, model.TagIdsData); if (model.Description.HasValue()) { await ResolveMentionsAsync(model.Description, social); } }