mcabber/mcabber/utils.c
changeset 2346 7921c8d671c8
parent 2338 6424627913be
--- a/mcabber/mcabber/utils.c	Sat May 11 23:06:34 2019 +0200
+++ b/mcabber/mcabber/utils.c	Tue May 14 22:19:33 2019 +0200
@@ -142,6 +142,17 @@
   return (ret == 0) ? TRUE : FALSE;
 }
 
+const char *jid_get_resource_name(const char *fjid)
+{
+  const char * resource_name = NULL;
+  if (fjid) {
+    resource_name = strchr(fjid, JID_RESOURCE_SEPARATOR);
+    if (resource_name)
+      resource_name++;
+  }
+  return resource_name;
+}
+
 //  expand_filename(filename)
 // Expand "~/" with the $HOME env. variable in a file name.
 // The caller must free the string after use.