]> granicus.if.org Git - ejabberd/commitdiff
allow get_default on PEP nodes (EJAB-656)
authorChristophe Romain <christophe.romain@process-one.net>
Thu, 19 Jun 2008 09:08:39 +0000 (09:08 +0000)
committerChristophe Romain <christophe.romain@process-one.net>
Thu, 19 Jun 2008 09:08:39 +0000 (09:08 +0000)
SVN Revision: 1364

src/mod_pubsub/mod_pubsub.erl

index cb8ce997dcb034654bdaa44e1468d43474ffd3f0..349c7ad4fe9969a33775e7fc6a608912d4bf86c2 100644 (file)
@@ -2352,7 +2352,10 @@ get_configure(Host, Node, From, Lang) ->
     transaction(Host, Node, Action, sync_dirty).
 
 get_default(Host, _Node, _From, Lang) ->
-    Type = hd(plugins(Host)),  % first configured plugin is default
+    Type = case Host of 
+    {_, _, _} -> ?PEPNODE;
+    _ -> hd(plugins(Host))
+    end,
     Options = node_options(Type),
     {result, [{xmlelement, "pubsub", [{"xmlns", ?NS_PUBSUB_OWNER}],
                [{xmlelement, "default", [],