diff options
-rw-r--r-- | doc/guide.html | 3 | ||||
-rw-r--r-- | doc/guide.tex | 3 | ||||
-rw-r--r-- | src/mod_pubsub/mod_pubsub_odbc.erl | 2 | ||||
-rw-r--r-- | src/mod_pubsub/pubsub_odbc.patch | 2 |
4 files changed, 6 insertions, 4 deletions
diff --git a/doc/guide.html b/doc/guide.html index 4a2bfd22b..1a56ae7a4 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -2797,7 +2797,8 @@ service. If the <TT>host</TT> option is not specified, the Jabber ID will be the hostname of the virtual host with the prefix ‘<TT>pubsub.</TT>’. The keyword "@HOST@" is replaced at start time with the real virtual host name. -If you use <TT>mod_pubsub_odbc</TT>, you can only use the prefix ‘<TT>pubsub.</TT>’. +If you use <TT>mod_pubsub_odbc</TT>, please ensure the prefix contains only one dot, +for example ‘<TT>pubsub.</TT>’, or ‘<TT>publish.</TT>’,. </DD><DT CLASS="dt-description"><B><TT>{access_createnode, AccessName}</TT></B></DT><DD CLASS="dd-description"> This option restricts which users are allowed to create pubsub nodes using ACL and ACCESS. diff --git a/doc/guide.tex b/doc/guide.tex index d8f7b2a5d..d2ddeda7e 100644 --- a/doc/guide.tex +++ b/doc/guide.tex @@ -3573,7 +3573,8 @@ and it requires \modcaps{}. Options: \begin{description} \hostitem{pubsub} - If you use \modpubsubodbc, you can only use the prefix `\jid{pubsub.}'. + If you use \modpubsubodbc, please ensure the prefix contains only one dot, + for example `\jid{pubsub.}', or `\jid{publish.}',. \titem{\{access\_createnode, AccessName\}} \ind{options!access\_createnode} This option restricts which users are allowed to create pubsub nodes using ACL and ACCESS. diff --git a/src/mod_pubsub/mod_pubsub_odbc.erl b/src/mod_pubsub/mod_pubsub_odbc.erl index 910ceda2e..0cbcdf38f 100644 --- a/src/mod_pubsub/mod_pubsub_odbc.erl +++ b/src/mod_pubsub/mod_pubsub_odbc.erl @@ -3557,7 +3557,7 @@ transaction_retry(Host, Fun, Trans, Count) -> odbc_conn({_U, Host, _R})-> Host; odbc_conn(Host) -> - Host--"pubsub.". %% TODO, improve that for custom host + lists:dropwhile(fun(A) -> A/=$. end, Host) -- ".". %% escape value for database storage escape({_U, _H, _R}=JID)-> diff --git a/src/mod_pubsub/pubsub_odbc.patch b/src/mod_pubsub/pubsub_odbc.patch index 9bd66e4f2..5d73dd1ba 100644 --- a/src/mod_pubsub/pubsub_odbc.patch +++ b/src/mod_pubsub/pubsub_odbc.patch @@ -760,7 +760,7 @@ +odbc_conn({_U, Host, _R})-> + Host; +odbc_conn(Host) -> -+ Host--"pubsub.". %% TODO, improve that for custom host ++ lists:dropwhile(fun(A) -> A/=$. end, Host) -- ".". + +%% escape value for database storage +escape({_U, _H, _R}=JID)-> |