Search code examples
xmppopenfirevcf-vcardtigase

Can XMPP roster contacts have no IM or presence but have a vCard?


I would like to use the XMPP roster provided by my server to also contain contacts of common external contacts for my group (eg. our commonly called distributors, the ISP support line, pizza we always order, etc.) Obviously these contacts don't need presence or the ability to message. They just exist in the roster with a vCard containing the phone numbers. Is this possible?


Solution

  • It's possible but (if I understood correctly your requirements) not out-of-the-box. And more information would be needed: will those contacts have any JID? Or do you want to use roster as sort of a personal "addressbook" (so you could add there whatever you want)? Do you want to manually edit those entries (vCards) or will they be provided by the server/shared in your group? There could be a couple of solutions to this problem:

    • if the contact information were to come from external sources you could use Tigase's Dynamic Rosters which would allow additional, shared contacts within the group
    • you could create additional entity/(external)component, let's call it "Address Book", which would allow you set/edit vCards of entities within those components (that could also be shared with users)
    • you could use XEP-0049: Private XML Storage