Software /
code /
prosody
Comparison
plugins/mod_vcard.lua @ 357:17bcecb06420
Use a stanza for c2s stream features instead of an array of strings. Removes a FIXME.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 20 Nov 2008 01:33:25 +0000 |
parent | 307:8ff052a77cac |
child | 421:63be85693710 |
comparison
equal
deleted
inserted
replaced
356:8ff322b550a3 | 357:17bcecb06420 |
---|---|
41 end | 41 end |
42 return true; | 42 return true; |
43 end | 43 end |
44 end); | 44 end); |
45 | 45 |
46 local feature_vcard_attr = { var='vcard-temp' }; | |
46 add_event_hook("stream-features", | 47 add_event_hook("stream-features", |
47 function (session, features) | 48 function (session, features) |
48 if session.type == "c2s" then | 49 if session.type == "c2s" then |
49 t_insert(features, "<feature var='vcard-temp'/>"); | 50 features:tag("feature", feature_vcard_attr):up(); |
50 end | 51 end |
51 end); | 52 end); |