From d3ea5b7e233cc5ce1d7a13c08a873320d54dbed4 Mon Sep 17 00:00:00 2001 From: Doc Date: Mon, 29 Sep 2025 19:47:02 -0300 Subject: [PATCH] Fix message producer defaults for 4.4+ --- docs/apis/core/message/index.md | 8 ++++---- versioned_docs/version-4.4/apis/core/message/index.md | 8 ++++---- versioned_docs/version-4.5/apis/core/message/index.md | 8 ++++---- versioned_docs/version-5.0/apis/core/message/index.md | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/apis/core/message/index.md b/docs/apis/core/message/index.md index 7d2f24ed70..5a1b696e0f 100644 --- a/docs/apis/core/message/index.md +++ b/docs/apis/core/message/index.md @@ -80,21 +80,21 @@ Once your `messages.php` is complete you need to increase the version number of ```php title="The default processor can be set using an element of the array" 'mynotification' => [ 'defaults' => [ - 'pop-up' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF, + 'pop-up' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED, 'email' => MESSAGE_PERMITTED, ], ], ``` -With that setting email will be permitted but disabled for each user by default. It can be turned on by each user through the `preferences/notification` preferences options (`/message/notificationpreferences.php?userid=X`) +With that setting email will be permitted but disabled for each user by default. It can be turned on by each user through the `preferences/notification` preferences options (`/message/notificationpreferences.php?userid=X`) The possible values are recorded in the lib.php file of messaging ```php /** * Define contants for messaging default settings population. For unambiguity of * plugin developer intentions we use 4-bit value (LSB numbering): - * bit 0 - whether to send message when user is loggedin (MESSAGE_DEFAULT_LOGGEDIN) - * bit 1 - whether to send message when user is loggedoff (MESSAGE_DEFAULT_LOGGEDOFF) + * bit 0 - whether to send message (MESSAGE_DEFAULT_ENABLED) + * bit 1 - not used * bit 2..3 - messaging permission (MESSAGE_DISALLOWED|MESSAGE_PERMITTED|MESSAGE_FORCED) * * MESSAGE_PERMITTED_MASK contains the mask we use to distinguish permission setting diff --git a/versioned_docs/version-4.4/apis/core/message/index.md b/versioned_docs/version-4.4/apis/core/message/index.md index 7d2f24ed70..5a1b696e0f 100644 --- a/versioned_docs/version-4.4/apis/core/message/index.md +++ b/versioned_docs/version-4.4/apis/core/message/index.md @@ -80,21 +80,21 @@ Once your `messages.php` is complete you need to increase the version number of ```php title="The default processor can be set using an element of the array" 'mynotification' => [ 'defaults' => [ - 'pop-up' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF, + 'pop-up' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED, 'email' => MESSAGE_PERMITTED, ], ], ``` -With that setting email will be permitted but disabled for each user by default. It can be turned on by each user through the `preferences/notification` preferences options (`/message/notificationpreferences.php?userid=X`) +With that setting email will be permitted but disabled for each user by default. It can be turned on by each user through the `preferences/notification` preferences options (`/message/notificationpreferences.php?userid=X`) The possible values are recorded in the lib.php file of messaging ```php /** * Define contants for messaging default settings population. For unambiguity of * plugin developer intentions we use 4-bit value (LSB numbering): - * bit 0 - whether to send message when user is loggedin (MESSAGE_DEFAULT_LOGGEDIN) - * bit 1 - whether to send message when user is loggedoff (MESSAGE_DEFAULT_LOGGEDOFF) + * bit 0 - whether to send message (MESSAGE_DEFAULT_ENABLED) + * bit 1 - not used * bit 2..3 - messaging permission (MESSAGE_DISALLOWED|MESSAGE_PERMITTED|MESSAGE_FORCED) * * MESSAGE_PERMITTED_MASK contains the mask we use to distinguish permission setting diff --git a/versioned_docs/version-4.5/apis/core/message/index.md b/versioned_docs/version-4.5/apis/core/message/index.md index 7d2f24ed70..5a1b696e0f 100644 --- a/versioned_docs/version-4.5/apis/core/message/index.md +++ b/versioned_docs/version-4.5/apis/core/message/index.md @@ -80,21 +80,21 @@ Once your `messages.php` is complete you need to increase the version number of ```php title="The default processor can be set using an element of the array" 'mynotification' => [ 'defaults' => [ - 'pop-up' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF, + 'pop-up' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED, 'email' => MESSAGE_PERMITTED, ], ], ``` -With that setting email will be permitted but disabled for each user by default. It can be turned on by each user through the `preferences/notification` preferences options (`/message/notificationpreferences.php?userid=X`) +With that setting email will be permitted but disabled for each user by default. It can be turned on by each user through the `preferences/notification` preferences options (`/message/notificationpreferences.php?userid=X`) The possible values are recorded in the lib.php file of messaging ```php /** * Define contants for messaging default settings population. For unambiguity of * plugin developer intentions we use 4-bit value (LSB numbering): - * bit 0 - whether to send message when user is loggedin (MESSAGE_DEFAULT_LOGGEDIN) - * bit 1 - whether to send message when user is loggedoff (MESSAGE_DEFAULT_LOGGEDOFF) + * bit 0 - whether to send message (MESSAGE_DEFAULT_ENABLED) + * bit 1 - not used * bit 2..3 - messaging permission (MESSAGE_DISALLOWED|MESSAGE_PERMITTED|MESSAGE_FORCED) * * MESSAGE_PERMITTED_MASK contains the mask we use to distinguish permission setting diff --git a/versioned_docs/version-5.0/apis/core/message/index.md b/versioned_docs/version-5.0/apis/core/message/index.md index 7d2f24ed70..5a1b696e0f 100644 --- a/versioned_docs/version-5.0/apis/core/message/index.md +++ b/versioned_docs/version-5.0/apis/core/message/index.md @@ -80,21 +80,21 @@ Once your `messages.php` is complete you need to increase the version number of ```php title="The default processor can be set using an element of the array" 'mynotification' => [ 'defaults' => [ - 'pop-up' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF, + 'pop-up' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED, 'email' => MESSAGE_PERMITTED, ], ], ``` -With that setting email will be permitted but disabled for each user by default. It can be turned on by each user through the `preferences/notification` preferences options (`/message/notificationpreferences.php?userid=X`) +With that setting email will be permitted but disabled for each user by default. It can be turned on by each user through the `preferences/notification` preferences options (`/message/notificationpreferences.php?userid=X`) The possible values are recorded in the lib.php file of messaging ```php /** * Define contants for messaging default settings population. For unambiguity of * plugin developer intentions we use 4-bit value (LSB numbering): - * bit 0 - whether to send message when user is loggedin (MESSAGE_DEFAULT_LOGGEDIN) - * bit 1 - whether to send message when user is loggedoff (MESSAGE_DEFAULT_LOGGEDOFF) + * bit 0 - whether to send message (MESSAGE_DEFAULT_ENABLED) + * bit 1 - not used * bit 2..3 - messaging permission (MESSAGE_DISALLOWED|MESSAGE_PERMITTED|MESSAGE_FORCED) * * MESSAGE_PERMITTED_MASK contains the mask we use to distinguish permission setting