summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/oscar/liboscar/sendmessagetask.cpp
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2019-12-10 01:24:17 +0100
committerSlávek Banko <[email protected]>2019-12-10 01:24:17 +0100
commit91ba38a1df42b56caa73babc90ffa4f674c000d4 (patch)
treecb65a7a13ac72de8a4ef610424da9195edca0a0c /kopete/protocols/oscar/liboscar/sendmessagetask.cpp
parentf2553c2ff47de1bcf060f22edd5c23d9cb653bc3 (diff)
downloadtdenetwork-91ba38a1df42b56caa73babc90ffa4f674c000d4.tar.gz
tdenetwork-91ba38a1df42b56caa73babc90ffa4f674c000d4.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 <[email protected]>
Diffstat (limited to 'kopete/protocols/oscar/liboscar/sendmessagetask.cpp')
-rw-r--r--kopete/protocols/oscar/liboscar/sendmessagetask.cpp32
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)