DEV: Pass `post` instead of `transformedPost` to post-bottom-ad (#199)

Changes in 0948d6b19e caused the post-bottom-ad component to start receiving the widget-ised 'transformedPost' instead of the original `post` model. In most cases this difference didn't matter, but it did cause noticable issues with `@model.category` and `@model.topic`.

This commit also deletes the unused `post-bottom/discourse-adplugin.hbs` connector. In the past, the adplugin itself was defining the post-bottom outlet. But now, we use RenderGlimmer to load the `post-bottom-ad` directly.
This commit is contained in:
David Taylor 2024-02-14 13:59:36 +00:00 committed by GitHub
parent 751916b8e3
commit 1677f7ae39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View File

@ -1 +0,0 @@
{{post-bottom-ad model=this}}

View File

@ -14,7 +14,7 @@ export default {
withPluginApi("0.1", (api) => { withPluginApi("0.1", (api) => {
api.decorateWidget("post:after", (helper) => { api.decorateWidget("post:after", (helper) => {
return helper.attach("after-post-ad", helper.attrs); return helper.attach("after-post-ad", helper.widget.model);
}); });
}); });