diff options
author | Evgeny Khramtsov <xramtsov@gmail.com> | 2014-08-19 13:28:15 +0400 |
---|---|---|
committer | Evgeny Khramtsov <xramtsov@gmail.com> | 2014-08-19 13:28:15 +0400 |
commit | ae0d31a8c98ff0928f2325c4596d20137d0167c0 (patch) | |
tree | 93f4784b2f57e963237b40a762f4c16f9b7a455b | |
parent | Merge pull request #277 from weiss/xep-0198 (diff) | |
parent | Store persistent MUC room during creation (diff) |
Merge pull request #280 from weiss/store-persistent-muc-on-init
Store peristent MUC room during creation
-rw-r--r-- | src/mod_muc_room.erl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl index 3842fde40..6a2a91d21 100644 --- a/src/mod_muc_room.erl +++ b/src/mod_muc_room.erl @@ -127,6 +127,13 @@ init([Host, ServerHost, Access, Room, HistorySize, RoomShaper, Creator, _Nick, D just_created = true, room_shaper = Shaper}), State1 = set_opts(DefRoomOpts, State), + if (State1#state.config)#config.persistent -> + mod_muc:store_room(State1#state.server_host, + State1#state.host, + State1#state.room, + make_opts(State1)); + true -> ok + end, ?INFO_MSG("Created MUC room ~s@~s by ~s", [Room, Host, jlib:jid_to_string(Creator)]), add_to_log(room_existence, created, State1), |