v0.0.0-...-823dbf3 Latest Latest

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

Go to latest
Published: Apr 9, 2022 License: BSD-2-Clause Imports: 8 Imported by: 0



Package event contains events that may be emited by the client.



This section is empty.


This section is empty.


This section is empty.


type ChatMessage

type ChatMessage struct {

	Body     string          `xml:"body,omitempty"`
	OriginID stanza.OriginID `xml:"urn:xmpp:sid:0 origin-id"`
	SID      []stanza.ID     `xml:"urn:xmpp:sid:0 stanza-id"`
	Delay    delay.Delay     `xml:"urn:xmpp:delay delay"`

	// Sent is true if this message is one that we sent from another device (for
	// example, a message forwarded to us by message carbons).
	Sent bool `xml:"-"`
	// Account is true if this message was sent by the server (empty from, or
	// from matching the bare JID of the authenticated account).
	Account bool `xml:"-"`

ChatMessage is sent when messages of type "chat" or "normal" are received or sent.

type CloseChat

type CloseChat roster.Item

CloseChat is sent when the chat view is closed.

type Connected

type Connected struct{}

Connected is sent immediately after the connection is esablished.

type DeleteBookmark

type DeleteBookmark bookmarks.Channel

DeleteBookmark is sent when a bookmark has been removed.

type DeleteRosterItem

type DeleteRosterItem roster.Item

DeleteRosterItem is sent when a roster item has been removed (eg. after UpdateRoster triggers a removal or it is removed in the UI).

type ExecCommand

type ExecCommand commands.Command

ExecCommand is sent by the UI when an ad-hoc command should be executed.

type FetchBookmarks

type FetchBookmarks struct {
	Items <-chan UpdateBookmark

FetchBookmarks is sent when the full list of bookmarks is fetched.

type FetchRoster

type FetchRoster struct {
	Ver   string
	Items <-chan UpdateRoster

FetchRoster is sent when a roster is fetched.

type HistoryMessage

type HistoryMessage struct {
	Result struct {
		QueryID string `xml:"queryid,attr"`
		ID      string `xml:"id,attr"`
		Forward struct {
			Msg ChatMessage `xml:"jabber:client message"`
		} `xml:"urn:xmpp:forward:0 forwarded"`
	} `xml:"urn:xmpp:mam:2 result"`

HistoryMessage is sent on incoming messages resulting from a history query.

type LoadingCommands

type LoadingCommands jid.JID

LoadingCommands is sent by the UI when the ad-hoc command window opens.

type NewCaps

type NewCaps struct {
	From jid.JID
	Caps disco.Caps

NewCaps is sent when new capabilities have been discovered.

type NewFeatures

type NewFeatures struct {
	To   jid.JID
	Info chan<- struct {
		Info disco.Info
		Err  error

NewFeatures is sent when entity features should be refreshed.

type OpenChannel

type OpenChannel bookmarks.Channel

OpenChannel is sent when a bookmark is selected.

type OpenChat

type OpenChat roster.Item

OpenChat is sent when a roster item is selected.

type PullToRefreshChat

type PullToRefreshChat roster.Item

PullToRefreshChat is sent when we scroll up while already at the top of the history or when we simply scroll to the top of the history.

type Receipt

type Receipt string

Receipt is sent when a message receipt is received and represents the ID of the message that should be marked as received. It may be sent by itself, or in addition to a ChatMessage event (or others) if the payload containing the receipt also contains other events.

type StatusAway

type StatusAway jid.JID

StatusAway is sent when the user should change their status to away.

type StatusBusy

type StatusBusy jid.JID

StatusBusy is sent when the user should change their status to busy.

type StatusOffline

type StatusOffline jid.JID

StatusOffline is sent when the user should go offline.

type StatusOnline

type StatusOnline jid.JID

StatusOnline is sent when the user should come online.

type Subscribe

type Subscribe jid.JID

Subscribe is sent when we subscribe to a users presence.

type UpdateBookmark

type UpdateBookmark bookmarks.Channel

UpdateBookmark is sent when a bookmark should be updated (eg. if you have subscribed to bookmark updates and received a push).

type UpdateRoster

type UpdateRoster struct {
	Ver string

UpdateRoster is sent when a roster item should be updated (eg. after a roster push).

Jump to

Keyboard shortcuts

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