DEV: Allow actions to change the manifest endpoint (PR #14522)

This allows plugins to set @manifest_url in an action, so that the manifest endpoint can be changed.

GitHub

Can we introduce a plugin api for plugins to override the manifest_url?

We could I guess where you pass in the controller, action, and manifest url. And there is a before_action that would check the current controller/action and set it.

I’m not really convinced we need that API but I could do it

On Tue, Oct 5, 2021 at 9:09 PM Alan Guo Xiang Tan @.***> wrote:

@.**** commented on this pull request.

Can we introduce a plugin api for plugins to override the manifest_url?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/discourse/discourse/pull/14522#pullrequestreview-772131795, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3WQB4SZMWWB324FYGDG6DUFOVXFANCNFSM5FMM3PRQ .

– Mark VanLandingham markvanlan.com +1-913-449-4960

I’m not really convinced we need that API but I could do it

I think at the minimum we need to document the usage. Otherwise, no one is going to remember why that instance variable exists in core and for what purpose in the future.

Yeah totally agree. I’ll write a solid comment on the helper. Thanks for the suggestion

On Tue, Oct 5, 2021 at 9:46 PM Alan Guo Xiang Tan @.***> wrote:

I’m not really convinced we need that API but I could do it

I think at the minimum we need to document the usage. Otherwise, no one is going to remember why that instance variable exists in core and for what purpose in the future.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/discourse/discourse/pull/14522#issuecomment-935305280, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3WQB7YO5MC7W6KCXQNEN3UFO2BDANCNFSM5FMM3PRQ .

– Mark VanLandingham markvanlan.com +1-913-449-4960

Awesome :+1: Thank you for doing that.