-
Notifications
You must be signed in to change notification settings - Fork 252
/
xep0380.ts
32 lines (27 loc) · 866 Bytes
/
xep0380.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
// ====================================================================
// XEP-0380: Explicit Message Encryption
// --------------------------------------------------------------------
// Source: https://xmpp.org/extensions/xep-0380.html
// Version: 0.2.0 (2018-01-25)
// ====================================================================
import { attribute, DefinitionOptions } from '../jxt';
import { NS_EME_0 } from '../Namespaces';
declare module './' {
export interface Message {
encryptionMethod?: EncryptionMethod;
}
}
export interface EncryptionMethod {
name?: string;
id: string;
}
const Protocol: DefinitionOptions = {
element: 'encryption',
fields: {
id: attribute('namespace'),
name: attribute('name')
},
namespace: NS_EME_0,
path: 'message.encryptionMethod'
};
export default Protocol;