Mercurial > prosody-hg
comparison plugins/muc/muc.lib.lua @ 7406:92755ca737c3
MUC: Log cases of possible room resynchronisation
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 28 Apr 2016 22:03:00 +0200 |
| parents | 5a65750d959a |
| children | 9a3ce6da3256 |
comparison
equal
deleted
inserted
replaced
| 7405:5a65750d959a | 7406:92755ca737c3 |
|---|---|
| 425 local is_last_orig_session; | 425 local is_last_orig_session; |
| 426 if orig_occupant ~= nil then | 426 if orig_occupant ~= nil then |
| 427 -- Is there are least 2 sessions? | 427 -- Is there are least 2 sessions? |
| 428 local iter, ob, last = orig_occupant:each_session(); | 428 local iter, ob, last = orig_occupant:each_session(); |
| 429 is_last_orig_session = iter(ob, iter(ob, last)) == nil; | 429 is_last_orig_session = iter(ob, iter(ob, last)) == nil; |
| 430 end | |
| 431 | |
| 432 -- TODO Handle these cases sensibly | |
| 433 local muc_x = stanza:get_child("x", "http://jabber.org/protocol/muc"); | |
| 434 if orig_occupant == nil and not muc_x then | |
| 435 module:log("debug", "Join without <x>, possibly desynced"); | |
| 436 elseif orig_occupant ~= nil and muc_x then | |
| 437 module:log("debug", "Presence update with <x>, possibly desynced"); | |
| 430 end | 438 end |
| 431 | 439 |
| 432 local event, event_name = { | 440 local event, event_name = { |
| 433 room = self; | 441 room = self; |
| 434 origin = origin; | 442 origin = origin; |
