Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Commit

Permalink
Fix - Message Options
Browse files Browse the repository at this point in the history
avoid show edit option for received or forwarded message
  • Loading branch information
saeedmozaffariGithub committed Aug 20, 2018
1 parent 799094f commit 3a4668b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3a4668b

Please sign in to comment.