projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9e3cb3
)
MUC: Restore last message from state, not room config (missing change from cbb05b454c13)
author
Kim Alvefur
<zash@zash.se>
Sat, 30 Apr 2016 15:25:06 +0000
(17:25 +0200)
committer
Kim Alvefur
<zash@zash.se>
Sat, 30 Apr 2016 15:25:06 +0000
(17:25 +0200)
plugins/muc/muc.lib.lua
patch
|
blob
|
history
diff --git
a/plugins/muc/muc.lib.lua
b/plugins/muc/muc.lib.lua
index fea0ba93c97063f73317af439b49c9aaab65439f..238cd3e1b57741c7d53241b9ac1a3775b80aa93d 100644
(file)
--- a/
plugins/muc/muc.lib.lua
+++ b/
plugins/muc/muc.lib.lua
@@
-1343,10
+1343,10
@@
function _M.restore_room(frozen, state)
local room_jid = frozen._jid;
local room = _M.new_room(room_jid, frozen._data);
- if
frozen._last_message and frozen
._last_message_at then
+ if
state and state._last_message and state
._last_message_at then
room._history = {
- { stanza = st.deserialize(
frozen
._last_message),
- timestamp =
frozen
._last_message_at, },
+ { stanza = st.deserialize(
state
._last_message),
+ timestamp =
state
._last_message_at, },
};
end