xep0012

package
v0.54.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

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

	// XEPNumber represents last activity XEP number.
	XEPNumber = "0012"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Last

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

Last represents a last activity (XEP-0012) module type.

func New

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

New returns a new initialized Last instance.

func (*Last) AccountFeatures

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

AccountFeatures returns account last activity features.

func (*Last) MatchesNamespace

func (m *Last) MatchesNamespace(namespace string, _ bool) bool

MatchesNamespace tells whether namespace matches last activity module.

func (*Last) Name

func (m *Last) Name() string

Name returns last activity module name.

func (*Last) ProcessIQ

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

ProcessIQ process a last activity info iq.

func (*Last) ServerFeatures

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

ServerFeatures returns server last activity features.

func (*Last) Start

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

Start starts last activity module.

func (*Last) Stop

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

Stop stops last activity module.

func (*Last) StreamFeature

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

StreamFeature returns last activity stream feature.

Jump to

Keyboard shortcuts

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