Problem/Motivation

When writing integrations to the module, it would be useful to be able to use the JS APIs. I am aware that some of these may not be public and so shouldn't be used as there is no real documentation of them. However, at least hasAgreed is documented.

The issue is that when you provide a category to hasAgreed, the mode is not taken into account and so it will return false if you are using any mode except categories mode, where really for an opt-in mode without categories it should return true for all categories.

This makes third-party integrations more involved as they need to be "mode-aware".

Steps to reproduce

Call hasAgreed with a category with opt-in mode and it returns false.

Proposed resolution

Handle the mode in hasAgreedWithCategory.

Remaining tasks

-

User interface changes

-

API changes

-

Data model changes

-

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Driskell created an issue. See original summary.

svenryen’s picture

Thanks for the report, I'll have a look tomorrow.

svenryen’s picture

I'll get around to this bug within a few weeks. Sorry for the delay.

svenryen’s picture

Status: Active » Needs review

svenryen’s picture

Unless I'm looking at the wrong data, there seems to be no changes in the issue branch. Moving this to "Active".

svenryen’s picture

Status: Needs review » Active

  • svenryen committed e49937f on 8.x-1.x
    Issue #3254210 by svenryen, Driskell: hasAgreed / hasAgreedWithCategory...
svenryen’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.