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>2016-10-26 11:39:44 +0300
committerEion Robb <eion@robbmob.com>2016-10-26 11:39:44 +0300
commit7b7fc6d1666ea737e4e6d47baa9c5b05f5e05730 (patch)
tree26e2c7d5acfb20000af2339bc60baf12b23bddc4
parentb5fbb1eb1bd1229b1f1a3d75146ca3c89c210a64 (diff)
Blindly try to make Skype for Business connections work by prefixing buddies with a 2:
-rw-r--r--skypeweb/libskypeweb.h1
-rw-r--r--skypeweb/skypeweb_util.c6
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 {