Software /
code /
prosody
Comparison
plugins/muc/mod_muc.lua @ 7417:4c8ee8175f5e
MUC: Lower priority of hook so plugins hooks run before
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 04 May 2016 11:08:51 +0200 |
parent | 7415:cbb05b454c13 |
child | 7536:3f8520b59677 |
comparison
equal
deleted
inserted
replaced
7416:c33a1d6da016 | 7417:4c8ee8175f5e |
---|---|
123 module:hook("muc-occupant-left",function(event) | 123 module:hook("muc-occupant-left",function(event) |
124 local room = event.room | 124 local room = event.room |
125 if not room:has_occupant() and not persistent.get(room) then -- empty, non-persistent room | 125 if not room:has_occupant() and not persistent.get(room) then -- empty, non-persistent room |
126 module:fire_event("muc-room-destroyed", { room = room }); | 126 module:fire_event("muc-room-destroyed", { room = room }); |
127 end | 127 end |
128 end); | 128 end, -1); |
129 | 129 |
130 function track_room(room) | 130 function track_room(room) |
131 rooms:set(room.jid, room); | 131 rooms:set(room.jid, room); |
132 -- When room is created, over-ride 'save' method | 132 -- When room is created, over-ride 'save' method |
133 room.save = room_save; | 133 room.save = room_save; |