From 028c3bc94cf3f120029298d159da8a69e275e23c Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Wed, 1 May 2019 10:23:48 +0100 Subject: [PATCH] Merge pull request #1742 from sharelatex/bg-avoid-unnecessary-callback-for-emit-to-room remove unnecessary callback on emitToRoom GitOrigin-RevId: a34006d6f72862b1f2e0b88d20ad8003ea5b8883 --- services/web/app/coffee/Features/Chat/ChatController.coffee | 2 +- services/web/test/unit/coffee/Chat/ChatControllerTests.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/app/coffee/Features/Chat/ChatController.coffee b/services/web/app/coffee/Features/Chat/ChatController.coffee index fa1f3216e2..ca5b84b024 100644 --- a/services/web/app/coffee/Features/Chat/ChatController.coffee +++ b/services/web/app/coffee/Features/Chat/ChatController.coffee @@ -19,7 +19,7 @@ module.exports = ChatController = UserInfoManager.getPersonalInfo message.user_id, (err, user) -> return next(err) if err? message.user = UserInfoController.formatPersonalInfo(user) - EditorRealTimeController.emitToRoom project_id, "new-chat-message", message, (err)-> + EditorRealTimeController.emitToRoom project_id, "new-chat-message", message res.send(204) getMessages: (req, res, next)-> diff --git a/services/web/test/unit/coffee/Chat/ChatControllerTests.coffee b/services/web/test/unit/coffee/Chat/ChatControllerTests.coffee index 8a7fd757ea..be83de686e 100644 --- a/services/web/test/unit/coffee/Chat/ChatControllerTests.coffee +++ b/services/web/test/unit/coffee/Chat/ChatControllerTests.coffee @@ -12,7 +12,7 @@ describe "ChatController", -> @settings = {} @ChatApiHandler = {} @EditorRealTimeController = - emitToRoom:sinon.stub().callsArgWith(3) + emitToRoom:sinon.stub() @AuthenticationController = getLoggedInUserId: sinon.stub().returns(@user_id) @ChatController = SandboxedModule.require modulePath, requires: