diff options
author | Eion Robb <eion@robbmob.com> | 2016-03-30 11:01:35 +0300 |
---|---|---|
committer | Eion Robb <eion@robbmob.com> | 2016-03-30 11:01:35 +0300 |
commit | 922ca9580ead376b3c451458f914fa27b772a1a3 (patch) | |
tree | 85197fcfb647973eb6617b79ce89f36448149c52 /skypeweb/skypeweb_util.c | |
parent | 80368db8f881ed005d9632a48602b35aba9864b4 (diff) |
SkypeWeb : Make it easier to support more user-prefixes (like for phone numbers) in the future
Diffstat (limited to 'skypeweb/skypeweb_util.c')
-rw-r--r-- | skypeweb/skypeweb_util.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/skypeweb/skypeweb_util.c b/skypeweb/skypeweb_util.c index f6bfb73..9ed3cf6 100644 --- a/skypeweb/skypeweb_util.c +++ b/skypeweb/skypeweb_util.c @@ -81,6 +81,7 @@ 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) return NULL;
start = start + 3;
@@ -268,3 +269,15 @@ skypeweb_fetch_url_request(SkypeWebAccount *sa, return url_data;
}
+
+const gchar *
+skypeweb_user_url_prefix(const gchar *who)
+{
+ if (SKYPEWEB_BUDDY_IS_MSN(who)) {
+ return "1:";
+ } else if(SKYPEWEB_BUDDY_IS_PHONE(who)) {
+ return "4:";
+ } else {
+ return "8:";
+ }
+}
|