xep0191

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName represents blocklist module name.
	ModuleName = "blocklist"

	// XEPNumber represents blocklist XEP number.
	XEPNumber = "0191"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockList

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

BlockList represents blocklist (XEP-0191) module type.

func New

func New(
	router router.Router,
	hosts *host.Hosts,
	resMng *c2s.ResourceManager,
	rep repository.Repository,
	hk *hook.Hooks,
	logger kitlog.Logger,
) *BlockList

New returns a new initialized BlockList instance.

func (*BlockList) AccountFeatures

func (m *BlockList) AccountFeatures(_ context.Context) ([]string, error)

AccountFeatures returns blocklist account disco features.

func (*BlockList) MatchesNamespace

func (m *BlockList) MatchesNamespace(namespace string, serverTarget bool) bool

MatchesNamespace tells whether namespace matches blocklist module.

func (*BlockList) Name

func (m *BlockList) Name() string

Name returns blocklist module name.

func (*BlockList) ProcessIQ

func (m *BlockList) ProcessIQ(ctx context.Context, iq *stravaganza.IQ) error

ProcessIQ process a blocklist iq.

func (*BlockList) ServerFeatures

func (m *BlockList) ServerFeatures(_ context.Context) ([]string, error)

ServerFeatures returns blocklist server disco features.

func (*BlockList) Start

func (m *BlockList) Start(_ context.Context) error

Start starts blocklist module.

func (*BlockList) Stop

func (m *BlockList) Stop(_ context.Context) error

Stop stops blocklist module.

func (*BlockList) StreamFeature

func (m *BlockList) StreamFeature(_ context.Context, _ string) (stravaganza.Element, error)

StreamFeature returns blocklist module stream feature.

Jump to

Keyboard shortcuts

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