Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2016-09-08 15:49:27 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2016-09-08 15:49:27 +0300
commit5ec972b00f2f140594eebfe1569e203cfb4f741c (patch)
treeb3498e8da8564d4a1f2c951704e58fed0a11fddd /src/node_dag.erl
parent45eb49125ba46cd692a9fb430c567c0c2cf4a84d (diff)
Improve pubsub code
Diffstat (limited to 'src/node_dag.erl')
-rw-r--r--src/node_dag.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/node_dag.erl b/src/node_dag.erl
index afb610ca7..45f8ade63 100644
--- a/src/node_dag.erl
+++ b/src/node_dag.erl
@@ -28,7 +28,7 @@
-author('bjc@kublai.com').
-include("pubsub.hrl").
--include("jlib.hrl").
+-include("xmpp.hrl").
-export([init/3, terminate/2, options/0, features/0,
create_node_permission/6, create_node/2, delete_node/1,
@@ -78,8 +78,9 @@ publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload, PubOpts) ->
case find_opt(node_type, Options) of
collection ->
Txt = <<"Publishing items to collection node is not allowed">>,
- {error,
- ?ERR_EXTENDED(?ERRT_NOT_ALLOWED(?MYLANG, Txt), <<"publish">>)};
+ {error, mod_pubsub:extended_error(
+ xmpp:err_not_allowed(Txt, ?MYLANG),
+ mod_pubsub:err_unsupported('publish'))};
_ ->
node_hometree:publish_item(Nidx, Publisher, Model,
MaxItems, ItemId, Payload, PubOpts)