Example #1
0
        private async Task FillLinkPreviewAsync(Entities.Social social)
        {
            var linkPreview = await _activityLinkPreviewService.GetActivityLinkPreviewAsync(social.Id);

            social.LinkPreview   = linkPreview;
            social.LinkPreviewId = linkPreview?.Id;
        }
Example #2
0
        private void FillLinkPreview(Entities.Social social)
        {
            var linkPreview = _activityLinkPreviewService.GetActivityLinkPreview(social.Id);

            social.LinkPreview   = linkPreview;
            social.LinkPreviewId = linkPreview?.Id;
        }
Example #3
0
        private SearchableUintraActivity Map(Entities.Social social)
        {
            var searchableActivity = social.Map <SearchableUintraActivity>();

            searchableActivity.Url          = _activityLinkService.GetLinks(social.Id).Details;
            searchableActivity.UserTagNames = _userTagService.Get(social.Id).Select(t => t.Text);
            return(searchableActivity);
        }
Example #4
0
 private static bool IsActualPublishDate(Entities.Social social) =>
 DateTime.Compare(social.PublishDate, DateTime.UtcNow) <= 0;
Example #5
0
 private bool IsCacheable(Entities.Social social) =>
 !IsBulletinHidden(social) && IsActualPublishDate(social);
Example #6
0
 private static bool IsBulletinHidden(Entities.Social social) => social == null || social.IsHidden;