25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

mod_muc_admin: Fix last timestamp retrieval

This commit is contained in:
Holger Weiss 2017-12-22 14:32:47 +01:00
parent 50b19b47e0
commit 5e4c547856

View File

@ -777,8 +777,9 @@ decide_room({_Room_name, _Host, Room_pid}, Last_allowed) ->
true -> true ->
{false, Ts_uptime}; {false, Ts_uptime};
false -> false ->
Last_message = calendar:now_to_universal_time(get_queue_last(History)), Last_message = get_queue_last(History),
{_, _, _, Ts_last, _} = Last_message, Ts_last = calendar:now_to_universal_time(
element(4, Last_message)),
Ts_diff = Ts_diff =
calendar:datetime_to_gregorian_seconds(Ts_now) calendar:datetime_to_gregorian_seconds(Ts_now)
- calendar:datetime_to_gregorian_seconds(Ts_last), - calendar:datetime_to_gregorian_seconds(Ts_last),