From a6eaea70dcf2bb94a07f8548d1929fff5b860039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 15 Aug 2019 15:47:13 +0200 Subject: [PATCH] Add UpdateComment support for Mentions in Comment --- backend/src/middleware/index.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/backend/src/middleware/index.js b/backend/src/middleware/index.js index ba5b9d324..c44e19edd 100644 --- a/backend/src/middleware/index.js +++ b/backend/src/middleware/index.js @@ -1,4 +1,6 @@ -import { applyMiddleware } from 'graphql-middleware' +import { + applyMiddleware +} from 'graphql-middleware' import CONFIG from './../config' import activityPub from './activityPubMiddleware' @@ -12,7 +14,7 @@ import user from './userMiddleware' import includedFields from './includedFieldsMiddleware' import orderBy from './orderByMiddleware' import validation from './validation/validationMiddleware' -import handleContentData from './handleHtmlContent/handleContentData' +import handleNotifications from './handleNotifications/handleNotifications' import email from './email/emailMiddleware' export default schema => { @@ -23,13 +25,15 @@ export default schema => { validation: validation, sluggify: sluggify, excerpt: excerpt, - handleContentData: handleContentData, + handleNotifications: handleNotifications, xss: xss, softDelete: softDelete, user: user, includedFields: includedFields, orderBy: orderBy, - email: email({ isEnabled: CONFIG.SMTP_HOST && CONFIG.SMTP_PORT }), + email: email({ + isEnabled: CONFIG.SMTP_HOST && CONFIG.SMTP_PORT + }), } let order = [ @@ -40,7 +44,7 @@ export default schema => { 'sluggify', 'excerpt', 'email', - 'handleContentData', + 'handleNotifications', 'xss', 'softDelete', 'user', @@ -62,4 +66,4 @@ export default schema => { const appliedMiddlewares = order.map(key => middlewares[key]) return applyMiddleware(schema, ...appliedMiddlewares) -} +} \ No newline at end of file