@xmpp-plugins/vcard
v1.2.0
Published
vcard plugin for xmpp.js
Downloads
2
Readme
vcard
This plugin allow retrieving and updating vcards.
Install
npm install @xmpp-plugins/vcard
Usage
import { client } from "@xmpp/client"
import setupVcard from "@xmpp-plugins/vcard"
const xmpp = client({service: 'wss://xmpp.example.com'})
const vcardPlugin = setupVcard(xmpp)
// Update our vcard
await vcardPlugin.set({
FN: 'John',
N: {
FAMILY: 'Doe',
GIVEN: 'John'
}
})
// Retrieve our current vcard and show it on the console
console.log(await vcardPlugin.get())