Subscription plugin accepts subscriptions automatically, but nickname is null


I’ve successfully installed and configured Subscription plugin. Now UserA can request subscription to UserB and they are both added to each other’s rosters. This is how I do it:

    BareJid contact = JidCreate.bareFrom(to + "@" + backendProperties.getXmpp().getDomain());
    roster.createItemAndRequestSubscription(contact, name, null);

notice how I pass name there. This ensures that in UserA’s roster UserB is added with his nickname. However the subsriptions plugin adds UserA automatically to UserB’s roster but without a nickname.

How can I add him automatically with his nickname?

I don’t think you can easily do that with the subscription plugin.

In XMPP, ‘subscribing’ and ‘adding to roster’ are two separate things. Subscribing is an authorization (which does not involve nicknames). This is what the subscription plugin does.

Adding someone to a roster (with an optional nickname) is a different thing. The subscription plugin does not help you here, I think.

Hi Guus,
thank you for your answer. Do you have any idea who is calling createItem from the opposite side? If I can find it perhaps I can work on a pull request for the subscription plugin or the openfire.

I believe this is done implicitly, but I don’t know for sure. I’'ve had a quick look, but can’t immediately find the corresponding specifications. You can probably find it fast enough if you look through Openfire’s presence subscription handling code.

Thank you Guus for your reply. Do you know if I can sposnsor someone to fix this issue? Does the project accept sponsoring fixes for issues?

You can try to reach out to people in our directory of service providers.