From 35a2f2990ae4880a8c92cdacd3925db9a0c38f65 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 6 Mar 2026 13:09:49 +0100 Subject: [PATCH] fix: Correct handling of create_fulljid without resource If resource was NULL/"" we otherwise had a trailing slash. --- src/xmpp/jid.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xmpp/jid.c b/src/xmpp/jid.c index 76aab2bf..26dfabdc 100644 --- a/src/xmpp/jid.c +++ b/src/xmpp/jid.c @@ -250,7 +250,11 @@ gchar* create_fulljid(const gchar* const barejid, const gchar* const resource) { auto_gchar gchar* barejidlower = g_utf8_strdown(barejid, -1); - return g_strdup_printf("%s/%s", barejidlower, resource); + if (resource && strlen(resource) > 0) { + return g_strdup_printf("%s/%s", barejidlower, resource); + } else { + return g_strdup(barejidlower); + } } /*