From 3a4668b5b7a29a8f92edd748c7f9bdc305d4833b Mon Sep 17 00:00:00 2001 From: saeedrooyekhat Date: Mon, 20 Aug 2018 14:18:39 +0430 Subject: [PATCH] Fix - Message Options avoid show edit option for received or forwarded message --- .../Chat Screen/Controller/IGMessageViewController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iGap/Libraries/Chat Screen/Controller/IGMessageViewController.swift b/iGap/Libraries/Chat Screen/Controller/IGMessageViewController.swift index 2b0d0ec..66ff8f5 100644 --- a/iGap/Libraries/Chat Screen/Controller/IGMessageViewController.swift +++ b/iGap/Libraries/Chat Screen/Controller/IGMessageViewController.swift @@ -954,9 +954,9 @@ class IGMessageViewController: UIViewController, DidSelectLocationDelegate, UIGe } func allowEdit(_ message: IGRoomMessage) -> Bool{ - if message.authorHash == currentLoggedInUserAuthorHash || - (self.room!.type == .channel && self.room!.channelRoom!.role == .owner) || - (self.room!.type == .group && self.room!.groupRoom!.role == .owner) { + if (message.forwardedFrom == nil) && message.authorHash == currentLoggedInUserAuthorHash && + ((self.room!.type == .channel && self.room!.channelRoom!.role == .owner) || + (self.room!.type == .group && self.room!.groupRoom!.role == .owner)) { return true } return false