aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEvgeny Khramtsov <ekhramtsov@process-one.net>2019-08-02 13:55:48 +0300
committerEvgeny Khramtsov <ekhramtsov@process-one.net>2019-08-02 13:59:42 +0300
commit5a976719fb821801fd162cde4516085416ef71e6 (patch)
tree9811d2e4b7da2e4396259a2e1ce7e1c839c5194a /tools
parentBump pkix version (diff)
Introduce 'vcard' option for the modules supporting vCards
The mapping between vCard's XML elements and YAML elements of 'vcard' option is straightforward. For example, if you want mod_muc to return the following vCard: ``` <vCard xmlns='vcard-temp'> <FN>Conferences</FN> <ADR> <WORK/> <STREET>Elm Street</STREET> </ADR> </vCard> ``` you need to set the configuration as: ``` modules: ... mod_muc: vcard: fn: Conferences adr: - work: true street: Elm Street ... ```
Diffstat (limited to 'tools')
-rwxr-xr-xtools/opt_types.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/opt_types.sh b/tools/opt_types.sh
index dba1f6679..658357cb2 100755
--- a/tools/opt_types.sh
+++ b/tools/opt_types.sh
@@ -393,6 +393,9 @@ spec(host, 0, _, _) ->
erl_types:t_binary();
spec(hosts, 0, _, _) ->
erl_types:t_list(erl_types:t_binary());
+spec(vcard_temp, 0, _, _) ->
+ erl_types:t_sup([erl_types:t_atom(undefined),
+ erl_types:t_tuple()]);
spec(options, A, [Form|OForm], Mod) when A == 1; A == 2 ->
case erl_syntax:type(Form) of
map_expr ->