Constructor

new(node:String, identities:Array<Identity>, features:Array<String>, data:Array<DataForm>, ?ver:Null<BytesData>)

Create a capabilities description.

Parameters:

node

capability node identifier

identities

disco identities advertised by the entity

features

disco feature namespaces advertised by the entity

data

extended disco data forms

ver

optional precomputed capability hash bytes

Variables

finaldata:ReadOnlyArray<DataForm>

finalfeatures:ReadOnlyArray<String>

finalidentities:ReadOnlyArray<Identity>

finalnode:String

Methods

addC(stanza:Stanza):Stanza

Add capability advertisements to a stanza.

Parameters:

stanza

stanza to mutate

Returns:

the same stanza for chaining

discoReply():Stanza

Build a disco#info query payload for this capability set.

isChannel(chatId:String):Bool

Check whether these capabilities describe a channel-like chat target.

Parameters:

chatId

ID to evaluate against the capability set

Returns:

true when the target looks like a MUC/channel

ver():String

Get the XEP-0115 capability hash encoded in base64.

verRaw():Hash

Get the raw XEP-0115 capability hash object for this capability set.