diff options
author | Eion Robb <eion@robbmob.com> | 2016-10-26 11:39:44 +0300 |
---|---|---|
committer | Eion Robb <eion@robbmob.com> | 2016-10-26 11:39:44 +0300 |
commit | 7b7fc6d1666ea737e4e6d47baa9c5b05f5e05730 (patch) | |
tree | 26e2c7d5acfb20000af2339bc60baf12b23bddc4 | |
parent | b5fbb1eb1bd1229b1f1a3d75146ca3c89c210a64 (diff) |
Blindly try to make Skype for Business connections work by prefixing buddies with a 2:
-rw-r--r-- | skypeweb/libskypeweb.h | 1 | ||||
-rw-r--r-- | skypeweb/skypeweb_util.c | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/skypeweb/libskypeweb.h b/skypeweb/libskypeweb.h index 00ca914..52de55e 100644 --- a/skypeweb/libskypeweb.h +++ b/skypeweb/libskypeweb.h @@ -270,6 +270,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:")) typedef struct _SkypeWebAccount SkypeWebAccount; typedef struct _SkypeWebBuddy SkypeWebBuddy; diff --git a/skypeweb/skypeweb_util.c b/skypeweb/skypeweb_util.c index d67b937..c4c16fa 100644 --- a/skypeweb/skypeweb_util.c +++ b/skypeweb/skypeweb_util.c @@ -82,8 +82,10 @@ skypeweb_contact_url_to_name(const gchar *url) start = g_strrstr(url, "/8:");
if (!start) start = g_strrstr(url, "/1:");
if (!start) start = g_strrstr(url, "/4:");
+ if (start) start = start + 2;
+ if (!start) start = g_strrstr(url, "/2:");
+ if (start) start = start + 1;
if (!start) return NULL;
- start = start + 3;
if ((end = strchr(start, '/'))) {
g_free(tempname);
@@ -394,6 +396,8 @@ skypeweb_user_url_prefix(const gchar *who) {
if (SKYPEWEB_BUDDY_IS_MSN(who)) {
return "1:";
+ } else if(SKYPEWEB_BUDDY_IS_S4B(who)) {
+ return ""; // already has the 2: prefix!
} else if(SKYPEWEB_BUDDY_IS_PHONE(who)) {
return "4:";
} else {
|