From 25523371fcf4d8c5ea5bf04222915f3369bf79c4 Mon Sep 17 00:00:00 2001 From: Christophe Romain Date: Mon, 12 Oct 2009 09:05:26 +0000 Subject: [PATCH] Default pubsub messages to headline if nothing is configured (thanks to Brian Cully) (EJAB-1061) SVN Revision: 2654 --- src/mod_pubsub/mod_pubsub.erl | 2 +- src/mod_pubsub/mod_pubsub_odbc.erl | 2 +- src/mod_pubsub/pubsub_odbc.patch | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl index c7815c4d5..d68edcaa2 100644 --- a/src/mod_pubsub/mod_pubsub.erl +++ b/src/mod_pubsub/mod_pubsub.erl @@ -3038,7 +3038,7 @@ get_options_for_subs(NodeID, Subs) -> % end broadcast_stanza(Host, Node, _NodeId, _Type, NodeOptions, SubsByDepth, NotifyType, BaseStanza) -> - NotificationType = get_option(NodeOptions, notification_type), + NotificationType = get_option(NodeOptions, notification_type, headline), BroadcastAll = get_option(NodeOptions, broadcast_all_resources), %% XXX this is not standard, but usefull From = service_jid(Host), Stanza = case NotificationType of diff --git a/src/mod_pubsub/mod_pubsub_odbc.erl b/src/mod_pubsub/mod_pubsub_odbc.erl index 06e831bcf..4d2fee285 100644 --- a/src/mod_pubsub/mod_pubsub_odbc.erl +++ b/src/mod_pubsub/mod_pubsub_odbc.erl @@ -2868,7 +2868,7 @@ get_options_for_subs(NodeID, Subs) -> % end broadcast_stanza(Host, Node, _NodeId, _Type, NodeOptions, SubsByDepth, NotifyType, BaseStanza) -> - NotificationType = get_option(NodeOptions, notification_type), + NotificationType = get_option(NodeOptions, notification_type, headline), BroadcastAll = get_option(NodeOptions, broadcast_all_resources), %% XXX this is not standard, but usefull From = service_jid(Host), Stanza = case NotificationType of diff --git a/src/mod_pubsub/pubsub_odbc.patch b/src/mod_pubsub/pubsub_odbc.patch index ffc65541e..58401a956 100644 --- a/src/mod_pubsub/pubsub_odbc.patch +++ b/src/mod_pubsub/pubsub_odbc.patch @@ -1,5 +1,5 @@ ---- mod_pubsub.erl 2009-10-06 17:17:31.000000000 +0200 -+++ mod_pubsub_odbc.erl 2009-10-06 17:18:05.000000000 +0200 +--- mod_pubsub.erl 2009-10-12 11:03:50.000000000 +0200 ++++ mod_pubsub_odbc.erl 2009-10-12 11:04:09.000000000 +0200 @@ -45,7 +45,7 @@ %%% TODO %%% plugin: generate Reply (do not use broadcast atom anymore)