Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/skype4pidgin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEion Robb <eion@robbmob.com>2011-02-21 03:28:54 +0300
committerEion Robb <eion@robbmob.com>2011-02-21 03:28:54 +0300
commit556e81e4612f1c4187d0982b7bfb66f066c7869d (patch)
tree810a1d6a08f380e598f915b4cf1310bce29bc31f /libskype.c
parent475c2f3e16820954adbe5f7b208f6f80ae700797 (diff)
Check and store protocol version and use that to decide how to sent chat messages
Diffstat (limited to 'libskype.c')
-rw-r--r--libskype.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/libskype.c b/libskype.c
index 9256ea2..6b5484e 100644
--- a/libskype.c
+++ b/libskype.c
@@ -144,6 +144,8 @@ static GStaticMutex chat_link_mutex = G_STATIC_MUTEX_INIT;
//This is used for incomming SMS status messages to be associated with a particular phone number
static GHashTable *sms_convo_link_table = NULL;
+static guint protocol_version = 7;
+
#include "debug.c"
#include "skype_messaging.c"
@@ -1696,6 +1698,7 @@ skype_login_part2(PurpleAccount *acct)
purple_timeout_add_seconds(10, (GSourceFunc) skype_login_retry, acct);
return FALSE;
}
+ sscanf(reply, "PROTOCOL %d", &protocol_version);
g_free(reply);
purple_connection_update_progress(gc, _("Hide Skype"), 3, 5);
@@ -1835,17 +1838,8 @@ skype_send_im(PurpleConnection *gc, const gchar *who, const gchar *message,
stripped = purple_markup_strip_html(message);
- if (conv == NULL || purple_conversation_get_data(conv, "chat_id") == NULL)
+ if (protocol_version < 5 || conv == NULL || purple_conversation_get_data(conv, "chat_id") == NULL)
{
- /*chat_id = g_new(char, 200);
- char *temp;
- temp = skype_send_message("CHAT CREATE %s", who);
- sscanf(temp, "CHAT %s ", chat_id);
- g_free(temp);
- if (conv != NULL)
- {
- purple_conversation_set_data(conv, "chat_id", chat_id);
- }*/
skype_send_message_nowait("MESSAGE %s %s", who, stripped);
} else {
chat_id = purple_conversation_get_data(conv, "chat_id");