xep0433

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: 11 Imported by: 0

Documentation

Overview

Package xep0433 implements XEP-0433: Extended Channel Search. Clients can search for public MUC rooms hosted on this server using keyword filters. The service is exposed at the server JID and responds to IQ-get/set queries with namespace urn:xmpp:channel-search:0.

Index

Constants

View Source
const (

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

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

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelSearch

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

ChannelSearch is the XEP-0433 module.

func New

func New(mucHost string, rep repository.Repository, rtr router.Router, logger kitlog.Logger) *ChannelSearch

New returns a new ChannelSearch instance.

func (*ChannelSearch) AccountFeatures

func (c *ChannelSearch) AccountFeatures(_ context.Context) ([]string, error)

AccountFeatures returns nil.

func (*ChannelSearch) MatchesNamespace

func (c *ChannelSearch) MatchesNamespace(namespace string, serverTarget bool) bool

MatchesNamespace returns true for the channel-search namespace on server targets.

func (*ChannelSearch) Name

func (c *ChannelSearch) Name() string

Name returns the module name.

func (*ChannelSearch) ProcessIQ

func (c *ChannelSearch) ProcessIQ(ctx context.Context, iq *stravaganza.IQ) error

ProcessIQ handles channel search IQ queries.

func (*ChannelSearch) ServerFeatures

func (c *ChannelSearch) ServerFeatures(_ context.Context) ([]string, error)

ServerFeatures returns the XEP-0433 feature string.

func (*ChannelSearch) Start

func (c *ChannelSearch) Start(_ context.Context) error

Start is a no-op — this module only handles IQs.

func (*ChannelSearch) Stop

func (c *ChannelSearch) Stop(_ context.Context) error

Stop is a no-op.

func (*ChannelSearch) StreamFeature

func (c *ChannelSearch) 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
⌂ 换网址