diff options
author | Alexey Shchepin <alexey@process-one.net> | 2003-07-21 20:01:22 +0000 |
---|---|---|
committer | Alexey Shchepin <alexey@process-one.net> | 2003-07-21 20:01:22 +0000 |
commit | 28c0fee27b7714b37df7aa30b9c491275f208ac7 (patch) | |
tree | 873956716c3e72798fca8ff9103dbae6995b1a0d /src/mod_pubsub | |
parent | * (all): Reorganized supervision tree (diff) |
* src/mod_vcard.erl: Bugfix
* src/mod_roster.erl: Bugfix
* src/jlib.hrl: Added iq:privacy namespace
* src/mod_irc/mod_irc_connection.erl: Added support for NOTICE and
CODEPAGE commands, better support for QUIT and PART commands
(thanks to Oleg V. Motienko)
SVN Revision: 126
Diffstat (limited to 'src/mod_pubsub')
-rw-r--r-- | src/mod_pubsub/mod_pubsub.erl | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl index ce0fb81f..c10e3122 100644 --- a/src/mod_pubsub/mod_pubsub.erl +++ b/src/mod_pubsub/mod_pubsub.erl @@ -17,7 +17,7 @@ loop/2, stop/0, system_continue/3, - system_terminate/4, + system_terminate/4, system_code_change/4]). -include("ejabberd.hrl"). @@ -454,8 +454,14 @@ create_new_node(Host, Node, Owner) -> case Node of [] -> {LOU, LOS, _} = jlib:jid_tolower(Owner), - NewNode = ["home", LOS, LOU, randoms:get_string()], - create_new_node(Host, NewNode, Owner); + HomeNode = ["home", LOS, LOU], + case create_new_node(Host, HomeNode, Owner) of + {error, _} = Error -> + Error; + _ -> + NewNode = ["home", LOS, LOU, randoms:get_string()], + create_new_node(Host, NewNode, Owner) + end; _ -> LOwner = jlib:jid_tolower(jlib:jid_remove_resource(Owner)), Parent = lists:sublist(Node, length(Node) - 1), |