mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
Fix issues on import improvements
This commit is contained in:
parent
a2fb493f91
commit
cc63bcc997
@ -13,7 +13,7 @@
|
||||
-export([init/2, store_messages/5, pop_messages/2, remove_expired_messages/1,
|
||||
remove_old_messages/2, remove_user/2, read_message_headers/2,
|
||||
read_message/3, remove_message/3, read_all_messages/2,
|
||||
remove_all_messages/2, count_messages/2, import/2]).
|
||||
remove_all_messages/2, count_messages/2, import/1]).
|
||||
|
||||
-include("xmpp.hrl").
|
||||
-include("mod_offline.hrl").
|
||||
@ -133,7 +133,7 @@ count_messages(LUser, LServer) ->
|
||||
0
|
||||
end.
|
||||
|
||||
import(_LServer, #offline_msg{us = US, timestamp = TS} = M) ->
|
||||
import(#offline_msg{us = US, timestamp = TS} = M) ->
|
||||
ejabberd_riak:put(M, offline_msg_schema(),
|
||||
[{i, TS}, {'2i', [{<<"us">>, US}]}]).
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
process_iq_set/3, process_iq_get/3, get_user_list/3,
|
||||
check_packet/6, remove_user/2, encode_list_item/1,
|
||||
is_list_needdb/1, updated_list/3,
|
||||
import_start/2, import_stop/2,
|
||||
item_to_xml/1, get_user_lists/2, import/5,
|
||||
set_privacy_list/1, mod_opt_type/1, depends/2]).
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
process_default_set/3, process_active_set/3,
|
||||
remove_privacy_list/3, set_privacy_list/1,
|
||||
set_privacy_list/4, get_user_list/2, get_user_lists/2,
|
||||
remove_user/2, import/2]).
|
||||
remove_user/2, import/1]).
|
||||
|
||||
-include("xmpp.hrl").
|
||||
-include("mod_privacy.hrl").
|
||||
@ -144,7 +144,7 @@ remove_user(LUser, LServer) ->
|
||||
F = fun () -> mnesia:delete({privacy, {LUser, LServer}}) end,
|
||||
mnesia:transaction(F).
|
||||
|
||||
import(_LServer, #privacy{} = P) ->
|
||||
import(#privacy{} = P) ->
|
||||
mnesia:dirty_write(P).
|
||||
|
||||
%%%===================================================================
|
||||
|
@ -15,7 +15,7 @@
|
||||
process_default_set/3, process_active_set/3,
|
||||
remove_privacy_list/3, set_privacy_list/1,
|
||||
set_privacy_list/4, get_user_list/2, get_user_lists/2,
|
||||
remove_user/2, import/2]).
|
||||
remove_user/2, import/1]).
|
||||
|
||||
-export([privacy_schema/0]).
|
||||
|
||||
@ -145,7 +145,7 @@ get_user_lists(LUser, LServer) ->
|
||||
remove_user(LUser, LServer) ->
|
||||
{atomic, ejabberd_riak:delete(privacy, {LUser, LServer})}.
|
||||
|
||||
import(_LServer, #privacy{} = P) ->
|
||||
import(#privacy{} = P) ->
|
||||
ejabberd_riak:put(P, privacy_schema()).
|
||||
|
||||
%%%===================================================================
|
||||
|
@ -14,7 +14,7 @@
|
||||
%% API
|
||||
-export([start_link/2]).
|
||||
-export([init/2, stop/1, get_vcard/2, set_vcard/4, search/4,
|
||||
remove_user/2, import/2, search_fields/1, search_reported/1,
|
||||
remove_user/2, import/3, search_fields/1, search_reported/1,
|
||||
mod_opt_type/1, opt_type/1]).
|
||||
|
||||
%% gen_server callbacks
|
||||
@ -157,7 +157,7 @@ search_items(Entries, State) ->
|
||||
remove_user(_User, _Server) ->
|
||||
{atomic, not_implemented}.
|
||||
|
||||
import(_, _) ->
|
||||
import(_, _, _) ->
|
||||
pass.
|
||||
|
||||
%%%===================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user