Mercurial > prosody-modules
comparison mod_storage_muconference_readonly/mod_storage_muconference_readonly.lua @ 2245:a0727d23ee65
mod_storage_muconference_readonly: Use the correct store name, and add description.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 24 Jul 2016 17:17:06 +0100 |
parents | 51596d73157e |
children |
comparison
equal
deleted
inserted
replaced
2244:e0663dcd934d | 2245:a0727d23ee65 |
---|---|
35 end | 35 end |
36 assert(false); | 36 assert(false); |
37 end | 37 end |
38 | 38 |
39 local function keyval_store_get() | 39 local function keyval_store_get() |
40 if store == "muc" then | 40 if store == "config" then |
41 local room_jid = room.."@"..host; | 41 local room_jid = room.."@"..host; |
42 local result; | 42 local result; |
43 for row in engine:select("SELECT `name`,`desc`,`topic`,`public`,`secret` FROM `rooms` WHERE `jid`=? LIMIT 1", room_jid or "") do result = row end | 43 for row in engine:select("SELECT `name`,`desc`,`topic`,`public`,`secret` FROM `rooms` WHERE `jid`=? LIMIT 1", room_jid or "") do result = row end |
44 local name = result[1]; | 44 local name = result[1]; |
45 local desc = result[2]; | 45 local desc = result[2]; |
68 return { | 68 return { |
69 jid = room_jid, | 69 jid = room_jid, |
70 _data = { | 70 _data = { |
71 persistent = true, | 71 persistent = true, |
72 name = name, | 72 name = name, |
73 description = desc, | |
73 subject = subject, | 74 subject = subject, |
74 password = secret, | 75 password = secret, |
75 hidden = hidden, | 76 hidden = hidden, |
76 }, | 77 }, |
77 _affiliations = affiliations, | 78 _affiliations = affiliations, |