Mercurial > prosody-modules
comparison mod_vcard_muc/mod_vcard_muc.lua @ 5903:6fb26b6691c0
mod_vcard_muc: use XEP-0486 form field for avatar hashes
author | Jonas Schäfer <jonas@wielicki.name> |
---|---|
date | Sat, 11 May 2024 09:52:11 +0200 |
parents | dddac5a3f447 |
children | d3a72777f149 |
comparison
equal
deleted
inserted
replaced
5902:8ff308fad9fd | 5903:6fb26b6691c0 |
---|---|
101 | 101 |
102 module:hook("muc-disco#info", function(event) | 102 module:hook("muc-disco#info", function(event) |
103 event.reply:tag("feature", { var = "vcard-temp" }):up(); | 103 event.reply:tag("feature", { var = "vcard-temp" }):up(); |
104 | 104 |
105 table.insert(event.form, { | 105 table.insert(event.form, { |
106 name = "{http://modules.prosody.im/mod_vcard_muc}avatar#sha1", | 106 name = "muc#roominfo_avatarhash", |
107 type = "text-single", | 107 type = "text-single", |
108 }); | 108 }); |
109 event.formdata["{http://modules.prosody.im/mod_vcard_muc}avatar#sha1"] = get_photo_hash(event.room); | 109 event.formdata["muc#roominfo_avatarhash"] = get_photo_hash(event.room); |
110 end); | 110 end); |
111 | 111 |
112 module:hook("muc-occupant-session-new", function(event) | 112 module:hook("muc-occupant-session-new", function(event) |
113 broadcast_presence(event.room, event.jid); | 113 broadcast_presence(event.room, event.jid); |
114 end) | 114 end) |