Comparison

plugins/muc/mod_muc.lua @ 8704:c0e812dd9dfc

MUC: Say something about storage failure before aborting (see #1091)
author Kim Alvefur <zash@zash.se>
date Mon, 12 Mar 2018 16:05:08 +0100
parent 8703:416b8ae3857d
child 8705:1d66f66a13c9
comparison
equal deleted inserted replaced
8703:416b8ae3857d 8704:c0e812dd9dfc
37 rooms = {}; 37 rooms = {};
38 local rooms = rooms; 38 local rooms = rooms;
39 local persistent_rooms_storage = module:open_store("persistent"); 39 local persistent_rooms_storage = module:open_store("persistent");
40 local persistent_rooms, err = persistent_rooms_storage:get(); 40 local persistent_rooms, err = persistent_rooms_storage:get();
41 if not persistent_rooms then 41 if not persistent_rooms then
42 module:log("error", "Error loading list of persistent rooms from storage. Reload mod_muc or restart to recover.");
42 assert(not err, err); 43 assert(not err, err);
43 persistent_rooms = {}; 44 persistent_rooms = {};
44 end 45 end
45 local room_configs = module:open_store("config"); 46 local room_configs = module:open_store("config");
46 47