From dd43402365ac82e6f28d373ea857a38f473e9f45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 10 Dec 2019 01:24:17 +0100 Subject: kopete: Restore the AIM protocol because a replacement AIM server was created. This reverts commits 036b0229db and dc34f9c391. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit 91ba38a1df42b56caa73babc90ffa4f674c000d4) --- .../protocols/oscar/liboscar/sendmessagetask.cpp | 32 ++++++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'kopete/protocols/oscar/liboscar/sendmessagetask.cpp') 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) -- cgit v1.2.1