--- 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.