-
Notifications
You must be signed in to change notification settings - Fork 253
/
rfc3921.ts
45 lines (38 loc) · 1.43 KB
/
rfc3921.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
42
43
44
45
// ====================================================================
// RFC 3921: Extensible Messaging and Presence Protocol (XMPP): Core
// --------------------------------------------------------------------
// Source: https://tools.ietf.org/html/rfc3921
//
// Additional:
// --------------------------------------------------------------------
// draft-cridland-xmpp-session-01: Here Lies Extensible Messaging and
// Presence Protocol (XMPP) Session Establishment
// -------------------------------------------------------------------
// Source: https://tools.ietf.org/html/draft-cridland-xmpp-session-01
// ====================================================================
import { childBoolean, DefinitionOptions } from '../jxt';
import { NS_SESSION } from '../Namespaces';
declare module './' {
export interface StreamFeatures {
legacySession?: SessionFeature;
}
export interface IQPayload {
legacySession?: boolean;
}
}
export interface SessionFeature {
optional?: boolean;
}
const Protocol: DefinitionOptions = {
aliases: ['features.legacySession', 'iq.legacySession'],
element: 'session',
fields: {
// draft-cridland-xmpp-session-01
//
// The <optional /> child is not yet standardized, but is
// still widely deployed to reduce client start times.
optional: childBoolean(null, 'optional')
},
namespace: NS_SESSION
};
export default Protocol;