/posts create and update consistency

The WP Discourse plugin currently uses a single request to create posts when publishing posts to Discourse and (potentially) two requests when updating posts.

The first request on update is to PostController#update, for the main post attributes, and the second is to TopicController#update to update the topic’s featured link, if that feature is being used.

There is some attempt in PostController#update to maintain consistency with PostController#create, e.g.

However, a topic’s featured link is not currently part of that consistency.

I’d like to make a PR to discourse/discourse to allow topic featured_link updates via PostController#update. It would simplify the WP Discourse plugin’s update logic. I wanted to canvas the change here first in case I’m missing anything.

1 Like