-
Notifications
You must be signed in to change notification settings - Fork 253
/
xep0186.ts
41 lines (36 loc) · 1.04 KB
/
xep0186.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// ====================================================================
// XEP-0186: Invisible Command
// --------------------------------------------------------------------
// Source: https://xmpp.org/extensions/xep-0186.html
// Version: 0.13 (2017-11-29)
// ====================================================================
import { booleanAttribute, DefinitionOptions } from '../jxt';
import { NS_INVISIBLE_0 } from '../Namespaces';
declare module './' {
export interface IQPayload {
visiblity?: Visibility;
}
}
export interface Visibility {
type: 'visible' | 'invisible';
probe?: boolean;
}
const Protocol: DefinitionOptions[] = [
{
element: 'invisible',
fields: {
probe: booleanAttribute('probe')
},
namespace: NS_INVISIBLE_0,
path: 'iq.visibility',
type: 'invisible',
typeField: 'type'
},
{
element: 'visible',
namespace: NS_INVISIBLE_0,
path: 'iq.visibility',
type: 'visible'
}
];
export default Protocol;