Skip to content

Commit

Permalink
[jabber] Disabled sending of Gone events
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-izo committed Aug 1, 2015
1 parent 47c5af4 commit dd835c2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -873,18 +873,18 @@ void JMUCSession::handleDeath(const QString &name)
bool JMUCSession::event(QEvent *ev)
{
Q_D(JMUCSession);
qDebug() << "event in JMUCSession";

if (ev->type() == ChatStateEvent::eventType()) {
qDebug() << "OH HAI! ChatStateEvent in JMUCSession, sir!";

ChatStateEvent *chatEvent = static_cast<ChatStateEvent *>(ev);
Jreen::ChatState::State state = static_cast<Jreen::ChatState::State>(chatEvent->chatState());

// HACK: look in JMUCSession::onServiceMessage for more info
if(d->slowmode && state != Jreen::ChatState::Composing)
return true;

if(state == Jreen::ChatState::Gone)
return true; // ChatState::Gone forbidden in MUC

Jreen::Message msg(Jreen::Message::Groupchat,
d->jid);
msg.setID(d->account.data()->client()->getID());
Expand Down

0 comments on commit dd835c2

Please sign in to comment.