framework/extensions/flags
Alexander Skvortsov e3f051bf4b fix: return user when creating flags (#42)
Fixes https://github.com/flarum/QualityAssurance/issues/41

When the API response is ingested by `pushObject`, since the flag instance is new, there is nothing to merge with, and therefore, there's no user on the flag instance in the store. As a result, the flag is displayed with "deleted" as the creating user until a page refresh occurs.

More broadly, this could be fixed by either:
- Refactoring the JSON API layer so that all singular operations return the same set of includes.
- Merging the API Paylod with sent data on model save (for new instances only).
But the former would require a major breaking rewrite, and the latter could introduce potentially unwanted side effects, and is effectively a bandaid over inconsistent backend behavior.
2022-01-13 16:39:00 -05:00
..
.github/workflows Move in visibility scoping from tags, add automated testing. 2021-05-11 20:04:52 -04:00
js Bundled output for commit 9d7f9eb0e5 2022-01-07 17:08:20 +00:00
less Webpack (#14) 2018-06-20 13:35:25 +09:30
locale Move locale files from language pack to extension. (#32) 2021-02-17 16:24:33 -05:00
migrations Fix down migration 2020-02-07 11:55:52 +01:00
src fix: return user when creating flags (#42) 2022-01-13 16:39:00 -05:00
tests remove phpunit cache 2021-05-25 15:49:32 +02:00
.editorconfig Initial commit 2015-09-04 13:26:51 +09:30
.gitattributes Webpack (#14) 2018-06-20 13:35:25 +09:30
.gitignore Webpack (#14) 2018-06-20 13:35:25 +09:30
.styleci.yml Update StyleCI rules 2016-11-16 15:46:13 +10:30
CHANGELOG.md Release v1.1.0 2021-10-11 21:07:45 -04:00
composer.json chore: bump bundled extension constraint to core 1.1 2021-10-13 08:03:50 +01:00
extend.php Move in visibility scoping from tags, add automated testing. 2021-05-11 20:04:52 -04:00
LICENSE Update copyright year 2021-05-15 00:49:42 +01:00