• Resolved codings

    (@codings)


    Thank you for this excellent plugin!

    Testing to see if it will work as a long term solution to replace a less user friendly messaging system.

    In message settings > notifications, it seems that there should be an admin option to globally set the defaults for “enable notifications via email” and “disable new message sound notifications.”

    You all thought of everything else, it is surprising that these are so limited. I had to turn the volume down on the sound notifications because I can’t find a way to turn it off by default, but allow the user to decide to turn it on. Same thing with email, there is no way to disable email notifications by default and let users turn them on. It also doesn’t allow for turning off all email notification, and for a heavily used site this is not ideal.

    By the way, in admin settings > messaging > sound notification control (Allow users to mute sound notifications from their user settings), with it turned off it still shows the option in the user settings.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Andrij Tkachenko

    (@andrijtkachenko)

    Hi @codings,

    Thank you so much for the kind words, and especially for such a clear, well-thought-out report — this is exactly the kind of feedback that helps me improve the plugin.

    1) The sound control bug
    Thanks for reporting, it will be fixed in next update.

    2) Default state for email / sound notifications (off by default, opt-in)

    This isn’t a dedicated admin option yet — I’ve noted it as a feature request — but you can get exactly the behavior you described today with a small snippet.

    It sets the default for users who haven’t changed their own preference, and each user can still turn notifications on from Messenger → Settings → Notifications:

    add_filter( 'default_user_metadata', function ( $value, $object_id, $meta_key, $single, $meta_type ) {    
    // Sound OFF by default ("Disable new message sound notification" starts checked)
    if ( 'bpbm_disable_sound_notification' === $meta_key ) {
    return 'yes';
    }

    // Email OFF by default ("Enable notifications via email" starts unchecked)
    if ( 'notification_messages_new_message' === $meta_key ) {
    return 'no';
    }

    return $value;
    }, 10, 5 );

    Add it to your theme’s functions.php or a “Code Snippets” plugin.

    Two things to keep in mind so it behaves as expected:

    • For the sound default, leave Settings → Messaging → “Sound Notification Control” enabled (so users are allowed to change it).
    • For the email default, make sure the email interval (Settings → Notifications → “How often to send email notifications…”) is greater than 0 — otherwise the email option won’t appear for users at all.

    3) Turning off ALL email notifications

    There’s already a built-in way to do this: go to Settings → Notifications and set “How often to send email notifications about unread messages” to 0. That disables message email notifications site-wide — ideal for a heavily used site.

    Hope that helps, and thanks again for testing so thoroughly! Let me know if anything’s unclear.

    Thanks!

    Thread Starter codings

    (@codings)

    Thank you for the quick reply! Implementing the snippet now and will report back shortly. 5 star plugin and support.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.