the-turk / flarum-diff

View post edit histories in your Flarum forum.
https://discuss.flarum.org/d/22779-diff-for-flarum
MIT License
8 stars 6 forks source link

Pass user to parse and request to render #35

Open n-peugnet opened 1 year ago

n-peugnet commented 1 year ago

Some extensions like flarum-mentions or club-1-cross-references make use of these additional parameters. So we need to pass these to able to render the messages.

See parse and render signatures from the API docs : https://api.docs.flarum.org/php/v1.6.0/flarum/formatter/formatter

Fixes #34

n-peugnet commented 1 year ago

You should then bump your flarum/core version to ^1.6.0 in composer.json as the third parameter of parse() is only present since this commit : flarum/flarum-core@f54bd6f

(The request parameter of render() is there since 1.3.0 : flarum/flarum-core@c3d9f43)

I didn't do it in this commit as the changes in composer.json and composer.lock would have added a lot of noise in the diff.

n-peugnet commented 1 year ago

Hmm this is strange. I am sure that it worked, but this does not seem to work anymore. I'm investigating.

n-peugnet commented 1 year ago

Okay. I just pushed a new commit to pass the correct actor to parse() for each revision.

n0099 commented 1 year ago

LGTM related: https://github.com/s9e/TextFormatter/issues/214

rafaucau commented 1 year ago

@the-turk Could you please merge?

n0099 commented 1 year ago

@the-turk Could you please merge?

You can apply changes in this pr without waiting for @the-turk to merge it and bump a new version on packagist by switching the source of package the-turk/flarum-diff from packagist to branch club-1/flarum-diff/fix-parse-and-render-missing-args in composer.json: https://getcomposer.org/doc/05-repositories.md https://stackoverflow.com/questions/12954051/use-php-composer-to-clone-git-repo