Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

Commented Issue: stream filtered tweet MatchingTracks is empty if matching @mention [2605]

$
0
0
No matching track is returned if it is an @username track



The issue is in here somewhere, but my linq skills are terrible so not quite sure where yet :)


```
private string[] GetMatchingKeywords(string input)
{
var regexToUse = _tracksContainsDollarTag ? _getStringWordsWithCashTagRegex : _getStringWordsRegex;

return regexToUse
.Matches(input.ToLower())
.OfType<Match>()
.Where(match =>
{
if (match.Value[0] == '#' || match.Value[0] == '$')
{
return _uniqueKeywordsHashSet.Contains(match.Value) ||
_uniqueKeywordsHashSet.Contains(match.Value.Substring(1, match.Value.Length - 1));
}

return _uniqueKeywordsHashSet.Contains(match.Value);
})
.Select(x => x.Value).ToArray();
}
```
Comments: ** Comment from web user: user_martin **

Many thanks as always :)


Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>