aboutsummaryrefslogtreecommitdiff
path: root/src/mod_roster.erl
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2016-01-28 14:23:51 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2016-01-28 14:23:51 +0300
commitb20db3b73678024b4fb786435355ab66f21de351 (patch)
treeb28fa5ad771b660a2b997841d6a2a1cd45aa342b /src/mod_roster.erl
parentNeed extra line before ## in markdown (diff)
Initial version of migration script from Prosody to ejabberd
Diffstat (limited to 'src/mod_roster.erl')
-rw-r--r--src/mod_roster.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mod_roster.erl b/src/mod_roster.erl
index adc2210db..278e9cb99 100644
--- a/src/mod_roster.erl
+++ b/src/mod_roster.erl
@@ -50,7 +50,7 @@
webadmin_user/4, get_versioning_feature/2,
roster_versioning_enabled/1, roster_version/2,
record_to_string/1, groups_to_string/1,
- mod_opt_type/1]).
+ mod_opt_type/1, set_roster/1]).
-include("ejabberd.hrl").
-include("logger.hrl").
@@ -411,6 +411,13 @@ get_roster(LUser, LServer, odbc) ->
_ -> []
end.
+set_roster(#roster{us = {LUser, LServer}, jid = LJID} = Item) ->
+ transaction(
+ LServer,
+ fun() ->
+ roster_subscribe_t(LUser, LServer, LJID, Item)
+ end).
+
item_to_xml(Item) ->
Attrs1 = [{<<"jid">>,
jid:to_string(Item#roster.jid)}],