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>2017-03-25 12:29:51 +0300
committerEion Robb <eion@robbmob.com>2017-03-25 12:29:51 +0300
commitaa420c6ac3c4d730fe78b5b9064bc5dabb873d57 (patch)
treebb1d4d59bf28466180291eef70745e4faceefd56
parent150bca864946616200cb1d775ce04fbb6bdb51af (diff)
Handle Skype bots/agents
-rw-r--r--skypeweb/libskypeweb.c10
-rw-r--r--skypeweb/libskypeweb.h3
-rw-r--r--skypeweb/skypeweb_util.c4
3 files changed, 12 insertions, 5 deletions
diff --git a/skypeweb/libskypeweb.c b/skypeweb/libskypeweb.c
index 8012e0e..e130e9e 100644
--- a/skypeweb/libskypeweb.c
+++ b/skypeweb/libskypeweb.c
@@ -130,8 +130,14 @@ skypeweb_tooltip_text(PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, gbool
const gchar *
skypeweb_list_emblem(PurpleBuddy *buddy)
{
- //SkypeWebBuddy *sbuddy = purple_buddy_get_protocol_data(buddy);
-
+ if (buddy != NULL) {
+ //SkypeWebBuddy *sbuddy = purple_buddy_get_protocol_data(buddy);
+ const gchar *buddy_name = purple_buddy_get_name(buddy);
+
+ if (buddy_name && SKYPEWEB_BUDDY_IS_BOT(buddy_name)) {
+ return "bot";
+ }
+ }
return NULL;
}
diff --git a/skypeweb/libskypeweb.h b/skypeweb/libskypeweb.h
index b24c98d..e87228f 100644
--- a/skypeweb/libskypeweb.h
+++ b/skypeweb/libskypeweb.h
@@ -271,7 +271,7 @@ G_MODULE_EXPORT GType skypeweb_protocol_get_type(void);
#define SKYPEWEB_VDMS_TTL 300
#define SKYPEWEB_CLIENTINFO_NAME "swx-skype.com"
-#define SKYPEWEB_CLIENTINFO_VERSION "908/1.63.51"
+#define SKYPEWEB_CLIENTINFO_VERSION "908/1.85.0.29"
#define SKYPEWEB_STATUS_ONLINE "Online"
#define SKYPEWEB_STATUS_IDLE "Idle"
@@ -284,6 +284,7 @@ G_MODULE_EXPORT GType skypeweb_protocol_get_type(void);
#define SKYPEWEB_BUDDY_IS_MSN(a) G_UNLIKELY((a) != NULL && strchr((a), '@') != NULL)
#define SKYPEWEB_BUDDY_IS_PHONE(a) G_UNLIKELY((a) != NULL && *(a) == '+')
#define SKYPEWEB_BUDDY_IS_S4B(a) G_UNLIKELY((a) != NULL && g_str_has_prefix((a), "2:"))
+#define SKYPEWEB_BUDDY_IS_BOT(a) G_UNLIKELY((a) != NULL && g_str_has_prefix((a), "28:"))
typedef struct _SkypeWebAccount SkypeWebAccount;
typedef struct _SkypeWebBuddy SkypeWebBuddy;
diff --git a/skypeweb/skypeweb_util.c b/skypeweb/skypeweb_util.c
index 2e7c7f9..dd2a225 100644
--- a/skypeweb/skypeweb_util.c
+++ b/skypeweb/skypeweb_util.c
@@ -394,8 +394,8 @@ skypeweb_url_prevent_follow_redirects(PurpleUtilFetchUrlData *requestdata)
const gchar *
skypeweb_user_url_prefix(const gchar *who)
{
- if(SKYPEWEB_BUDDY_IS_S4B(who)) {
- return ""; // already has the 2: prefix!
+ if(SKYPEWEB_BUDDY_IS_S4B(who) || SKYPEWEB_BUDDY_IS_BOT(who)) {
+ return ""; // already has a prefix
} else if (SKYPEWEB_BUDDY_IS_MSN(who)) {
return "1:";
} else if(SKYPEWEB_BUDDY_IS_PHONE(who)) {