]> granicus.if.org Git - ejabberd/commitdiff
rename pep_sendlast_offline option to ignore_pep_from_offline (EJAB-1047)
authorChristophe Romain <christophe.romain@process-one.net>
Wed, 23 Sep 2009 21:54:58 +0000 (21:54 +0000)
committerChristophe Romain <christophe.romain@process-one.net>
Wed, 23 Sep 2009 21:54:58 +0000 (21:54 +0000)
SVN Revision: 2621

doc/guide.tex
src/mod_pubsub/mod_pubsub.erl
src/mod_pubsub/mod_pubsub_odbc.erl

index 3aff973ecea30bc6e833da0ae20e458190d8d64f..0b43fa13554359262ad2c8e385e5b2ea63e575ae 100644 (file)
@@ -3566,10 +3566,10 @@ Options:
   The "dag" nodetree provides experimental support for PubSub Collection Nodes (\xepref{0248}).
   In that case you should also add "dag" node plugin as default, for example:
   \term{\{plugins, ["dag","flat","hometree","pep"]\}}
-\titem{\{pep\_sendlast\_offline, false|true\}} \ind{options!pep\_sendlast\_offline}
+\titem{\{ignore\_pep\_from\_offline, false|true\}} \ind{options!ignore\_pep\_from\_offline}
   To specify whether or not we should get last published PEP items
   from users in our roster which are offline when we connect. Value is true or false.
-  If not defined, pubsub assumes false so we only get last items of online contacts.
+  If not defined, pubsub assumes true so we only get last items of online contacts.
 \titem{\{last\_item\_cache, false|true\}} \ind{options!last\_item\_cache}
   To specify whether or not pubsub should cache last items. Value is true
   or false. If not defined, pubsub do not cache last items. On systems with not so many nodes,
index 31ffd278ead1a4c806d7be7dd3808e28a6128037..794c44e6e97ad25a2f03fdb39da4692cd86317ba 100644 (file)
                host,
                access,
                pep_mapping = [],
-               pep_sendlast_offline = false,
+               ignore_pep_from_offline = true,
                last_item_cache = false,
                max_items_node = ?MAXITEMS,
                nodetree = ?STDTREE,
@@ -177,7 +177,7 @@ init([ServerHost, Opts]) ->
     ?DEBUG("pubsub init ~p ~p",[ServerHost,Opts]),
     Host = gen_mod:get_opt_host(ServerHost, Opts, "pubsub.@HOST@"),
     Access = gen_mod:get_opt(access_createnode, Opts, all),
-    PepOffline = gen_mod:get_opt(pep_sendlast_offline, Opts, false),
+    PepOffline = gen_mod:get_opt(ignore_pep_from_offline, Opts, true),
     IQDisc = gen_mod:get_opt(iqdisc, Opts, one_queue),
     LastItemCache = gen_mod:get_opt(last_item_cache, Opts, false),
     MaxItemsNode = gen_mod:get_opt(max_items_node, Opts, ?MAXITEMS),
@@ -223,7 +223,7 @@ init([ServerHost, Opts]) ->
                server_host = ServerHost,
                access = Access,
                pep_mapping = PepMapping,
-               pep_sendlast_offline = PepOffline,
+               ignore_pep_from_offline = PepOffline,
                last_item_cache = LastItemCache,
                max_items_node = MaxItemsNode,
                nodetree = NodeTree,
@@ -491,7 +491,7 @@ send_loop(State) ->
        %% this is a hack in a sense that PEP should only be based on presence
        %% and is not able to "store" events of remote users (via s2s)
        %% this makes that hack only work for local domain by now
-       if State#state.pep_sendlast_offline ->
+       if not State#state.ignore_pep_from_offline ->
            {User, Server, Resource} = jlib:jid_tolower(JID),
            case mod_caps:get_caps({User, Server, Resource}) of
            nothing ->
index 6b731f5ed04528eec6d87e88e735b77ff65cfc65..b95f6ea4b6c37aea03a19b946f491a8e8d7af672 100644 (file)
                host,
                access,
                pep_mapping = [],
-               pep_sendlast_offline = false,
+               ignore_pep_from_offline = true,
                last_item_cache = false,
                max_items_node = ?MAXITEMS,
                nodetree = ?STDTREE,
@@ -177,7 +177,7 @@ init([ServerHost, Opts]) ->
     ?DEBUG("pubsub init ~p ~p",[ServerHost,Opts]),
     Host = gen_mod:get_opt_host(ServerHost, Opts, "pubsub.@HOST@"),
     Access = gen_mod:get_opt(access_createnode, Opts, all),
-    PepOffline = gen_mod:get_opt(pep_sendlast_offline, Opts, false),
+    PepOffline = gen_mod:get_opt(ignore_pep_from_offline, Opts, true),
     IQDisc = gen_mod:get_opt(iqdisc, Opts, one_queue),
     LastItemCache = gen_mod:get_opt(last_item_cache, Opts, false),
     MaxItemsNode = gen_mod:get_opt(max_items_node, Opts, ?MAXITEMS),
@@ -221,7 +221,7 @@ init([ServerHost, Opts]) ->
                server_host = ServerHost,
                access = Access,
                pep_mapping = PepMapping,
-               pep_sendlast_offline = PepOffline,
+               ignore_pep_from_offline = PepOffline,
                last_item_cache = LastItemCache,
                max_items_node = MaxItemsNode,
                nodetree = NodeTree,
@@ -315,7 +315,7 @@ send_loop(State) ->
        %% this is a hack in a sense that PEP should only be based on presence
        %% and is not able to "store" events of remote users (via s2s)
        %% this makes that hack only work for local domain by now
-       if State#state.pep_sendlast_offline ->
+       if not State#state.ignore_pep_from_offline ->
            {User, Server, Resource} = jlib:jid_tolower(JID),
            case mod_caps:get_caps({User, Server, Resource}) of
            nothing ->