diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2019-12-10 01:24:17 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2019-12-10 18:54:30 +0100 |
commit | dd43402365ac82e6f28d373ea857a38f473e9f45 (patch) | |
tree | 8a4825ac0df9d8f1f3f3685a9e0fd5f96d5e274d /kopete/protocols/oscar/liboscar/sendmessagetask.cpp | |
parent | 3ca6259d5b5b41ecce9759373714bdc57ff563d8 (diff) | |
download | tdenetwork-dd43402365ac82e6f28d373ea857a38f473e9f45.tar.gz tdenetwork-dd43402365ac82e6f28d373ea857a38f473e9f45.zip |
kopete: Restore the AIM protocol because a replacement AIM server was created.
This reverts commits 036b0229db and dc34f9c391.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 91ba38a1df42b56caa73babc90ffa4f674c000d4)
Diffstat (limited to 'kopete/protocols/oscar/liboscar/sendmessagetask.cpp')
-rw-r--r-- | kopete/protocols/oscar/liboscar/sendmessagetask.cpp | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/kopete/protocols/oscar/liboscar/sendmessagetask.cpp b/kopete/protocols/oscar/liboscar/sendmessagetask.cpp index 0f9c8f5f..d95c17ed 100644 --- a/kopete/protocols/oscar/liboscar/sendmessagetask.cpp +++ b/kopete/protocols/oscar/liboscar/sendmessagetask.cpp @@ -98,9 +98,21 @@ void SendMessageTask::onGo() break; } - b->addDWord( 0x00030000 ); //empty TLV 3 to get an ack from the server + // Add the TLV to indicate if this is an autoresponse: 0x00040000 + // Right now, only supported for the AIM client, I'm not sure about ICQ + // For some reason you can't have both a 0x0004 and 0x0003 TLV in the same + // SNAC, if you do the AIM server complains + if ( !client()->isIcq() && (m_autoResponse == true) ) + { + TLV tlv4( 0x0004, 0, NULL); + b->addTLV( tlv4 ); + } + else + { + b->addDWord( 0x00030000 ); //empty TLV 3 to get an ack from the server + } - if ( m_message.type() != 2 && ! m_message.hasProperty( Oscar::Message::StatusMessageRequest ) ) { + if ( client()->isIcq() && m_message.type() != 2 && ! m_message.hasProperty( Oscar::Message::StatusMessageRequest ) ) { b->addDWord( 0x00060000 ); //empty TLV 6 to store message on the server if not online } } @@ -130,10 +142,18 @@ void SendMessageTask::addChannel1Data( Buffer* b ) { Buffer tlv2buffer; - //Send features TLV using data from pidgin. - tlv2buffer.addDWord( 0x05010002 ); //TLV 0x0501, length 2 - tlv2buffer.addWord( 0x0106 ); //TLV 0x0501 data - + //Send features TLV using data from pidgin. Features are different + //depending on whether we're ICQ or AIM + if ( client()->isIcq() ) + { + tlv2buffer.addDWord( 0x05010002 ); //TLV 0x0501, length 2 + tlv2buffer.addWord( 0x0106 ); //TLV 0x0501 data + } + else + { + tlv2buffer.addDWord( 0x05010004 ); //TLV 0x0501, length 4 + tlv2buffer.addDWord( 0x01010102 ); //TLV 0x0501 data. + } //we only send one message part. There's only one client that actually uses //them and it's quite old and infrequently used tlv2buffer.addWord( 0x0101 ); //add TLV(0x0101) also known as TLV(257) |