Skip to content

[18.0][ADD] website_mass_mailing_altcha - #1218

Open
jans23 wants to merge 1 commit into
OCA:18.0from
Nitrokey:18.0-add-website_mass_mailing_altcha
Open

jans23 wants to merge 1 commit into
OCA:18.0from
Nitrokey:18.0-add-website_mass_mailing_altcha

Conversation

@jans23

@jans23 jans23 commented Sep 12, 2026

Copy link
Copy Markdown

This module adds ALTCHA support to the newsletter subscription snippets.

@OCA-git-bot OCA-git-bot added series:18.0 mod:website_mass_mailing_altcha Module website_mass_mailing_altcha labels Sep 12, 2026
@jans23
jans23 force-pushed the 18.0-add-website_mass_mailing_altcha branch 2 times, most recently from 8e0d3d9 to 5e0443e Compare September 12, 2026 17:55
@jans23 jans23 changed the title [ADD] website_mass_mailing_altcha [18.0][ADD] website_mass_mailing_altcha Sep 12, 2026
@jans23
jans23 marked this pull request as ready for review September 12, 2026 18:48
@jans23

jans23 commented Sep 12, 2026

Copy link
Copy Markdown
Author

@hbrunn maybe you would be willing to review this?

Comment on lines +11 to +24
altcha_prepend_to: ".js_subscribe_wrap",
});

publicWidget.registry.subscribe.include({
altcha_insert_widget() {
if (this.editableMode || !this.altcha_enabled) {
return;
}
if (!this.el.querySelector("altcha-widget")) {
this.$el
.find(this.altcha_prepend_to)
.append(renderToString("website_altcha.AltchaWidget", {}));
}
},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of doing this, an extra commit changing AltchaBaseFunctionality such that consumers of this class can either set altcha_prepend_to or altcha_append_to seems useful

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed as requested.

}
},

async altcha_get_payload() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all of the following is bullshit. the right thing to do here is override just _onSubscribeClick, wait for verification, attach to the rpc bus to inject the result (and detach the function afterwards), then call super. ~10loc, not 100

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed as requested.

@jans23
jans23 force-pushed the 18.0-add-website_mass_mailing_altcha branch from 5e0443e to 2d6c991 Compare September 18, 2026 06:38
@OCA-git-bot OCA-git-bot added the mod:website_altcha Module website_altcha label Sep 18, 2026
@jans23
jans23 force-pushed the 18.0-add-website_mass_mailing_altcha branch 2 times, most recently from 4179487 to 262da5e Compare September 18, 2026 07:03
@OCA-git-bot OCA-git-bot removed the mod:website_altcha Module website_altcha label Sep 18, 2026
@jans23
jans23 force-pushed the 18.0-add-website_mass_mailing_altcha branch from 262da5e to 5afb413 Compare September 18, 2026 07:08
.append(renderToString("website_altcha.AltchaWidget", {}));
}
},
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not what I asked for

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:website_mass_mailing_altcha Module website_mass_mailing_altcha series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants