mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +01:00
Merge changeset 1305 from ejabberd trunk.
2008-04-27 Alexey Shchepin <alexey@process-one.net> * src/mod_muc/mod_muc_room.erl: Fixed room shaper processing SVN Revision: 1309
This commit is contained in:
parent
6e5aaadf57
commit
2c795957ac
@ -2,6 +2,10 @@
|
||||
|
||||
* doc/guide.tex: Document the option max_s2s_connections
|
||||
|
||||
2008-04-27 Alexey Shchepin <alexey@process-one.net>
|
||||
|
||||
* src/mod_muc/mod_muc_room.erl: Fixed room shaper processing
|
||||
|
||||
2008-04-26 Badlop <badlop@process-one.net>
|
||||
|
||||
* src/mod_shared_roster.erl: Fix for new registered accounts not
|
||||
|
@ -697,31 +697,27 @@ code_change(_OldVsn, StateName, StateData, _Extra) ->
|
||||
%% {stop, Reason, NewStateData}
|
||||
%%----------------------------------------------------------------------
|
||||
handle_info({process_user_presence, From}, normal_state = _StateName, StateData) ->
|
||||
Activity = get_user_activity(From, StateData),
|
||||
Now = now_to_usec(now()),
|
||||
{Nick, Packet} = Activity#activity.presence,
|
||||
NewActivity = Activity#activity{presence_time = Now,
|
||||
presence = undefined},
|
||||
StateData1 =
|
||||
StateData#state{
|
||||
activity = ?DICT:store(
|
||||
jlib:jid_tolower(From),
|
||||
NewActivity,
|
||||
StateData#state.activity)},
|
||||
process_presence(From, Nick, Packet, StateData1);
|
||||
RoomQueueEmpty = queue:is_empty(StateData#state.room_queue),
|
||||
RoomQueue = queue:in({presence, From}, StateData#state.room_queue),
|
||||
StateData1 = StateData#state{room_queue = RoomQueue},
|
||||
if
|
||||
RoomQueueEmpty ->
|
||||
StateData2 = prepare_room_queue(StateData1),
|
||||
{next_state, normal_state, StateData2};
|
||||
true ->
|
||||
{next_state, normal_state, StateData1}
|
||||
end;
|
||||
handle_info({process_user_message, From}, normal_state = _StateName, StateData) ->
|
||||
Activity = get_user_activity(From, StateData),
|
||||
Now = now_to_usec(now()),
|
||||
Packet = Activity#activity.message,
|
||||
NewActivity = Activity#activity{message_time = Now,
|
||||
message = undefined},
|
||||
StateData1 =
|
||||
StateData#state{
|
||||
activity = ?DICT:store(
|
||||
jlib:jid_tolower(From),
|
||||
NewActivity,
|
||||
StateData#state.activity)},
|
||||
process_groupchat_message(From, Packet, StateData1);
|
||||
RoomQueueEmpty = queue:is_empty(StateData#state.room_queue),
|
||||
RoomQueue = queue:in({message, From}, StateData#state.room_queue),
|
||||
StateData1 = StateData#state{room_queue = RoomQueue},
|
||||
if
|
||||
RoomQueueEmpty ->
|
||||
StateData2 = prepare_room_queue(StateData1),
|
||||
{next_state, normal_state, StateData2};
|
||||
true ->
|
||||
{next_state, normal_state, StateData1}
|
||||
end;
|
||||
handle_info(process_room_queue, normal_state = StateName, StateData) ->
|
||||
case queue:out(StateData#state.room_queue) of
|
||||
{{value, {message, From}}, RoomQueue} ->
|
||||
|
Loading…
Reference in New Issue
Block a user