protected override bool FilterStatus(Dulcet.Twitter.TwitterStatusBase status) { var s = status as TwitterStatus; if (s == null) { var d = status as TwitterDirectMessage; if (d == null) return false; else return MatchingUtil.MatchAccount(d.Recipient.ScreenName, needle) || MatchingUtil.MatchAccount(d.Sender.ScreenName, needle); } else { return AccountStorage.Accounts .Where(i => MatchingUtil.MatchAccount(i.ScreenName, needle)) .Any(i => IsMemberOfTimeline(s, i)); } }
protected virtual bool Match(string haystack, string needle) { return(MatchingUtil.MatchAccount(haystack, needle)); }
public override bool FilterUser(Dulcet.Twitter.TwitterUser user) { return AccountStorage.Accounts.Where(i => MatchingUtil.MatchAccount(i.ScreenName, needle)) .Any(i => i.IsFollowing(user.NumericId)); }