From 962a90d3b977429ea1c5a1ad1f4fc8658fa79808 Mon Sep 17 00:00:00 2001 From: Harsha Nalluru Date: Wed, 9 Jan 2019 15:21:00 -0800 Subject: [PATCH] Fix AutoComplete Bug in messageSession.ts (#157) --- lib/session/messageSession.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/session/messageSession.ts b/lib/session/messageSession.ts index 8a89c13ccb9a..28f9d4eba16d 100644 --- a/lib/session/messageSession.ts +++ b/lib/session/messageSession.ts @@ -567,7 +567,11 @@ export class MessageSession extends LinkEntity { // If we've made it this far, then user's message handler completed fine. Let us try // completing the message. - if (this.autoComplete && this.receiveMode === ReceiveMode.peekLock) { + if ( + this.autoComplete && + this.receiveMode === ReceiveMode.peekLock && + !bMessage.delivery.remote_settled + ) { try { log.messageSession( "[%s] Auto completing the message with id '%s' on " + "the receiver '%s'.",