Take the flag's enabled status into account

Created on 28 October 2025, 1 day ago

Problem/Motivation

Migrating from existing github issue. https://github.com/Gizra/message_subscribe/pull/123

There's code in the module to pick up the first flag defined by \Drupal\message_subscribe\SubscribersInterface::getFlags(), however it doesn't currently take into account if the first flag is disabled.

Meaning that disabled flags can potentially be favoured ahead of a valid enabled flag.

Steps to reproduce

Have a disabled flag as one of the first flags returned by the subscriber.

Proposed resolution

Check the status of the flag entities before picking one.

Remaining tasks

Provide MR

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024