mirror of
https://github.com/wassname/talk.git
synced 2026-08-11 05:54:07 +08:00
test fixes
This commit is contained in:
@@ -218,7 +218,7 @@ const filterNewComment = async (context, {body, asset_id}) => {
|
||||
wl.scan('body', body),
|
||||
|
||||
// Return the asset's settings.
|
||||
AssetsService.rectifySettings(asset, settings)
|
||||
await AssetsService.rectifySettings(asset, settings)
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
+3
-1
@@ -34,13 +34,15 @@ module.exports = class AssetsService {
|
||||
globalSettings,
|
||||
asset,
|
||||
] = await Promise.all([
|
||||
settings || SettingsService.retrieve(),
|
||||
settings !== null ? settings : SettingsService.retrieve(),
|
||||
assetQuery,
|
||||
]);
|
||||
|
||||
// If the asset exists and has settings then return the merged object.
|
||||
if (asset && asset.settings) {
|
||||
settings = merge({}, globalSettings, asset.settings);
|
||||
} else {
|
||||
settings = globalSettings;
|
||||
}
|
||||
|
||||
return settings;
|
||||
|
||||
@@ -160,7 +160,7 @@ module.exports = class CommentsService {
|
||||
// We should adjust the comment's status such that if it was approved
|
||||
// previously, we should mark the comment as 'NONE' or 'PREMOD', which ever
|
||||
// was most recent if the new comment is destined to be `NONE` or `PREMOD`.
|
||||
if (originalComment.status === 'ACCEPTED' && ['NONE', 'PREMOD'].includes(status)) {
|
||||
if (originalComment.status === 'ACCEPTED' && status === 'NONE') {
|
||||
|
||||
const lastUnmoderatedStatus = CommentsService.lastUnmoderatedStatus(originalComment);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user