private Dictionary <uint, FeedReaction> GetFeedReactions(Activity activity) { Dictionary <uint, FeedReaction> reactions = new Dictionary <uint, FeedReaction>(); foreach (var reactionType in activity.Reactions.Where(r => r.Value > 0).Select(r => r.Key)) { var reaction = Reactions.GetByType(reactionType); reactions[reaction.reactionicon_id] = new FeedReaction(reaction, (uint)activity.Reactions[reactionType]); } return(reactions); }
private FeedReaction GetMyReaction(Activity activity, ulong userId) { var type = activity.Reaction(userId); if (!string.IsNullOrEmpty(type)) { var reaction = Reactions.GetByType(type); return(new FeedReaction(reaction, 0)); } //else return(null); }