mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-25 02:09:48 +01:00
Hopefully fix problems with the auto-message going to gtalk users
This commit is contained in:
parent
b2a0e41eab
commit
48f1745614
@ -18,6 +18,8 @@
|
||||
|
||||
#include "jabber_p.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QTime>
|
||||
#include <QTimer>
|
||||
@ -456,6 +458,11 @@ Jabber_p::handleMessage( const gloox::Message& m, gloox::MessageSession * /*sess
|
||||
QVariant v = parser.parse( msg.toAscii(), &ok );
|
||||
if ( !ok || v.type() != QVariant::Map )
|
||||
{
|
||||
if ( m.from().server().find( "googlemail." ) != string::npos
|
||||
|| m.from().server().find( "gmail." ) != string::npos
|
||||
|| m.from().server().find( "gtalk." ) != string::npos )
|
||||
return;
|
||||
|
||||
sendMsg( from, QString( "I'm sorry -- I'm just an automatic presence used by Tomahawk Player (http://gettomahawk.com). If you are getting this message, the person you are trying to reach is probably not signed on, so please try again later!" ) );
|
||||
return;
|
||||
}
|
||||
|
@ -334,6 +334,12 @@ Jabber_p::onNewMessage( const Jreen::Message& m )
|
||||
QVariant v = parser.parse( msg.toAscii(), &ok );
|
||||
if ( !ok || v.type() != QVariant::Map )
|
||||
{
|
||||
if ( m.from().domain().contains( "googlemail." )
|
||||
|| m.from().domain().contains( "gmail." )
|
||||
|| m.from().domain().contains( "gtalk." )
|
||||
)
|
||||
return;
|
||||
|
||||
QString to = from;
|
||||
QString response = QString( tr("I'm sorry -- I'm just an automatic presence used by Tomahawk Player"
|
||||
" (http://gettomahawk.com). If you are getting this message, the person you"
|
||||
|
Loading…
x
Reference in New Issue
Block a user