forked from legastero/stanza
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xep0264.ts
40 lines (35 loc) · 1.12 KB
/
xep0264.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
// ====================================================================
// XEP-0224: Attention
// --------------------------------------------------------------------
// Source: https://xmpp.org/extensions/xep-0224.html
// Version: Version 1.0 (2008-11-13)
// ====================================================================
import { addAlias, attribute, DefinitionOptions, integerAttribute } from '../jxt';
import { NS_BOB, NS_THUMBS_1 } from '../Namespaces';
import { Bits } from './';
declare module './xep0166' {
export interface Jingle {
bits?: Bits[];
}
}
export interface Thumbnail {
mediaType: string;
width?: number;
height?: number;
uri: string;
}
const Protocol: DefinitionOptions[] = [
addAlias(NS_BOB, 'data', [{ path: 'iq.jingle.bits', multiple: true }]),
{
element: 'thumbnail',
fields: {
height: integerAttribute('height'),
mediaType: attribute('media-type'),
uri: attribute('uri'),
width: integerAttribute('width')
},
namespace: NS_THUMBS_1,
path: 'thumbnail'
}
];
export default Protocol;