1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-05 00:22:31 +02:00

Re-match the regex

This commit is contained in:
Jeff Mitchell 2011-03-29 17:06:50 -04:00
parent b8721ad75a
commit 3657579c32

View File

@ -282,6 +282,7 @@ TwitterPlugin::parseGotTomahawk( const QRegExp &regex, const QString &screenName
{
QString myScreenName = TomahawkSettings::instance()->twitterScreenName();
qDebug() << "TwitterPlugin found an exact matching Got Tomahawk? mention or direct message from user " << screenName;
regex.exactMatch( text );
if ( text.startsWith( '@' ) && regex.captureCount() >= 2 && regex.cap( 1 ) != QString( '@' + myScreenName ) )
{
qDebug() << "TwitterPlugin skipping mention because it's directed @someone that isn't us";