Skip to content

Latest commit

 

History

History

vcard

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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())

References

XEP-0054: vcard-temp