25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Do not update muc_online_users table on MUC/Sub operations

This commit is contained in:
Evgeniy Khramtsov 2016-09-06 18:17:30 +03:00
parent 417284a921
commit 5ec2874a96

View File

@ -1217,6 +1217,7 @@ subscriber_becomes_available(From, Nick, Packet, StateData) ->
Role = get_default_role(Aff, State1),
State2 = set_role(From, Role, State1),
State3 = set_nick(From, Nick, State2),
tab_add_online_user(From, StateData),
send_existing_presences(From, State3),
send_initial_presence(From, State3, StateData),
State3.
@ -1752,7 +1753,6 @@ update_online_user(JID, #user{nick = Nick, subscriptions = Nodes,
NewStateData.
add_online_user(JID, Nick, Role, IsSubscriber, Nodes, StateData) ->
tab_add_online_user(JID, StateData),
User = #user{jid = JID, nick = Nick, role = Role,
is_subscriber = IsSubscriber, subscriptions = Nodes},
StateData1 = update_online_user(JID, User, StateData),
@ -1775,6 +1775,7 @@ remove_online_user(JID, StateData, _IsSubscriber = true, _Reason) ->
error ->
StateData#state.users
end,
tab_remove_online_user(JID, StateData),
StateData#state{users = Users};
remove_online_user(JID, StateData, _IsSubscriber, Reason) ->
LJID = jid:tolower(JID),
@ -2033,6 +2034,7 @@ add_new_user(From, Nick,
add_online_user(From, Nick, Role,
IsSubscribeRequest,
Nodes, StateData)),
tab_add_online_user(From, NewState),
send_existing_presences(From, NewState),
send_initial_presence(From, NewState, StateData),
Shift = count_stanza_shift(Nick, Els, NewState),