Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 7416:c33a1d6da016
MUC: Restore last message from state, not room config (missing change from cbb05b454c13)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 30 Apr 2016 17:25:06 +0200 |
parent | 7415:cbb05b454c13 |
child | 7418:e9f7043b86b5 |
comparison
equal
deleted
inserted
replaced
7415:cbb05b454c13 | 7416:c33a1d6da016 |
---|---|
1341 end | 1341 end |
1342 | 1342 |
1343 local room_jid = frozen._jid; | 1343 local room_jid = frozen._jid; |
1344 local room = _M.new_room(room_jid, frozen._data); | 1344 local room = _M.new_room(room_jid, frozen._data); |
1345 | 1345 |
1346 if frozen._last_message and frozen._last_message_at then | 1346 if state and state._last_message and state._last_message_at then |
1347 room._history = { | 1347 room._history = { |
1348 { stanza = st.deserialize(frozen._last_message), | 1348 { stanza = st.deserialize(state._last_message), |
1349 timestamp = frozen._last_message_at, }, | 1349 timestamp = state._last_message_at, }, |
1350 }; | 1350 }; |
1351 end | 1351 end |
1352 | 1352 |
1353 local occupants = {}; | 1353 local occupants = {}; |
1354 local occupant_sessions = {}; | 1354 local occupant_sessions = {}; |