Software / code / prosody
Comparison
plugins/muc/mod_muc.lua @ 8875:be3230b42f12
MUC: Allow passing config to public create_room API
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 14 Apr 2018 16:14:15 +0200 |
| parent | 8870:dd0291aa3393 |
| child | 8877:9182398c64b9 |
comparison
equal
deleted
inserted
replaced
| 8874:d6eb910a204d | 8875:be3230b42f12 |
|---|---|
| 220 return room; | 220 return room; |
| 221 end | 221 end |
| 222 return restore_room(room_jid); | 222 return restore_room(room_jid); |
| 223 end | 223 end |
| 224 | 224 |
| 225 function create_room(room_jid) | 225 function create_room(room_jid, config) |
| 226 local exists = get_room_from_jid(room_jid); | 226 local exists = get_room_from_jid(room_jid); |
| 227 if exists then | 227 if exists then |
| 228 return nil, "room-exists"; | 228 return nil, "room-exists"; |
| 229 end | 229 end |
| 230 local room = muclib.new_room(room_jid); | 230 local room = muclib.new_room(room_jid, config); |
| 231 module:fire_event("muc-room-created", { | 231 module:fire_event("muc-room-created", { |
| 232 room = room; | 232 room = room; |
| 233 }); | 233 }); |
| 234 return room; | 234 return room; |
| 235 end | 235 end |