xep0153

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package xep0153 implements XEP-0153: vCard-Based Avatars. The server injects <x xmlns='vcard-temp:x:update'><photo>SHA1HASH</photo></x> into outgoing presence stanzas so that all clients — including those that do not support XEP-0084 PEP avatars — see the correct avatar.

Additionally, when a user updates their vCard, the module re-broadcasts their current presence to all roster contacts so avatar hash propagates immediately.

Index

Constants

View Source
const (

	// ModuleName is the module registration name.
	ModuleName = "xep0153"

	// XEPNumber is the XEP number.
	XEPNumber = "0153"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type VCardPresence

type VCardPresence struct {
	// contains filtered or unexported fields
}

VCardPresence is the XEP-0153 module.

func New

func New(
	rep repository.Repository,
	resMng resourcemanager.Manager,
	rtr router.Router,
	hosts *host.Hosts,
	hk *hook.Hooks,
	logger kitlog.Logger,
) *VCardPresence

New returns a new VCardPresence instance.

func (*VCardPresence) AccountFeatures

func (v *VCardPresence) AccountFeatures(_ context.Context) ([]string, error)

AccountFeatures returns nil.

func (*VCardPresence) Name

func (v *VCardPresence) Name() string

Name returns the module name.

func (*VCardPresence) ServerFeatures

func (v *VCardPresence) ServerFeatures(_ context.Context) ([]string, error)

ServerFeatures returns nil — feature is implicit.

func (*VCardPresence) Start

func (v *VCardPresence) Start(_ context.Context) error

Start registers hooks.

func (*VCardPresence) Stop

func (v *VCardPresence) Stop(_ context.Context) error

Stop unregisters hooks.

func (*VCardPresence) StreamFeature

func (v *VCardPresence) StreamFeature(_ context.Context, _ string) (stravaganza.Element, error)

StreamFeature returns nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址