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

Reverse arguments order for timer:now_diff/2

This commit is contained in:
Maxim Ignatenko 2011-09-20 16:28:16 +03:00
parent c53ffe6dc5
commit eb8347f92b

View File

@ -304,7 +304,7 @@ normal_state({route, From, "",
MinInterval = (StateData#state.config)#config.voice_request_min_interval,
BareFrom = jlib:jid_remove_resource(jlib:jid_to_lower(From)),
LastTime = last_voice_request_time(BareFrom, StateData),
TimeFromLastRequest = timer:now_diff(LastTime, erlang:now()),
TimeFromLastRequest = timer:now_diff(erlang:now(), LastTime),
if
TimeFromLastRequest > MinInterval*1000000 ->
send_voice_request(From, StateData),