Client management: Nick in Group Chat Bookmarks

There is an optional attribute “nick” in XEP-0048. It is very useful because it is better see “John Doe” instead of “doe.j” in chat room.

It would be nice to have ability to point nick then creating “Group Chat Bookmark” (actually field of user properties, like “username”, “Name” or may be “Email”) that will be replaced by real value of users properties.

This plugin is not in development for many years. Most probably this option will not be implemented, unless you know a programmer who can do this and propose a patch.

Hello, I’ve made a quick patch by myself, that add checkbox to “Group Chat”. If it is checked, plugin will add {Name} to bookmark.

Here is patch and compiled jar for 3.10


Small addition: NameAsNick-patch0002.patch - column in bookmarks list
clientControl.jar (171719 Bytes)
NameAsNick-patch0002.patch.zip (838 Bytes)
NameAsNick-patch0001.patch.zip (2214 Bytes)

Thanks for the patch. I have filed this as [OF-967] Add option to use Name as a nickname when adding muc bookmark - Jive Software Open Source

But when i try your complided jar, it lets me set the option, but Spark and other clients still join the room with a username, when i use such bookmark to join. Am i missing something?

Oh, no, It’s my fault.

I tested it in Miranda NG, but it write XML log after its interpretation, not pure.

Here is third patch and working jar. I’ve tested it in Spark, Psi and Miranda NG.
NameAsNick-patch0003.patch.zip (595 Bytes)
clientControl.jar (171710 Bytes)

Still not working for me the way i was anticipating. I have a user with a username “john” and the Name set to “John Doe”. I add a group chat bookmark for this user and check Name as a nickname. Then i login to Spark with that user and go to Bookmarks > bookmark to a room. He joins the room, but in the list it shows “john”, not “John Doe”.

Btw, does patch 3 only have changes and you need patch1? You should better attach a patch with all changes in one file, would be easier to apply.

It is very strange, please check what server really send to client about bookmarks. Debug in Spark it is not very convenient, but should look like:

It looks more visual in Miranda NG

It works in Spark as well.

Sorry for Russian screenshots, my test environment is based on real AD, I hope they are understandable.

PS: I’ve attached diff of all three patches
NickAsName-patch.diff.zip (2452 Bytes)

I see those packets in the debug window. I can make it use Name as a nickname in Miranga NG, but it still doesn’t work for me in Spark for some reason. Maybe it’s a Spark issue. Which version you are testing with?

Anyway, i think we can submit this patch already. Just bump the date in the changelog to today and i would change it to “Added Name as a nickname option to Group Chat Bookmarks”. Do you want to submit it to Openfire’s Github as a PR on your own? Or should i attach your patch to a ticket and assign it to someone to apply? if you do a PR, attach a link to a ticket in the description, so it would connect to it automatically https://igniterealtime.org/issues/browse/OF-967

P.S. русский не проблема (но мне легче писать на латинице, да и другим понятно будет на английском).

I’m testing it with last Spark 2.7.3.715

I’m not a git/github guru, i’m afraid of doing something wrong. It would be great if you attach this patch to a ticket and assign it to someone to apply.

I’m on 720 build, but i don’t think there were any changes that could affect that. Must be something different, maybe room settings or something. Anyway, my users usually have nickname field filled in vCard, so Spark uses that when joining a room.

I will attach your patch and assign it to Daryl. He will probably apply and push the new version of plugin soon enough.

Ou, I have an assumption. Plugin does not replace already existed bookmark (with same jid), may be you already have this bookmark in your private storage.

No, i have tried with a completely new room jid and new bookmark. Still the same on Spark. And i do get the packets with a nickname setting. Not sure why it is not applying it.