From 9c9b8e08efeea6975b2d5e30f6c8abca681635c5 Mon Sep 17 00:00:00 2001
From: Vincent <vincent@loki.network>
Date: Tue, 7 Apr 2020 18:15:23 +1000
Subject: [PATCH] Remove redundant bool casting

---
 js/views/conversation_view.js                     | 2 +-
 ts/components/conversation/ConversationHeader.tsx | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js
index 301a1eb5c..564db2dd6 100644
--- a/js/views/conversation_view.js
+++ b/js/views/conversation_view.js
@@ -1339,7 +1339,7 @@
       // In future, we may be able to unsend private messages also
       // isServerDeletable also defined in ConversationHeader.tsx for
       // future reference
-      const isServerDeletable = !!isPublic;
+      const isServerDeletable = isPublic;
 
       const warningMessage = (() => {
         if (isPublic) {
diff --git a/ts/components/conversation/ConversationHeader.tsx b/ts/components/conversation/ConversationHeader.tsx
index 3a4a676ce..227f66246 100644
--- a/ts/components/conversation/ConversationHeader.tsx
+++ b/ts/components/conversation/ConversationHeader.tsx
@@ -363,7 +363,7 @@ export class ConversationHeader extends React.Component<Props> {
       i18n,
     } = this.props;
 
-    const isServerDeletable = !!isPublic;
+    const isServerDeletable = isPublic;
     const deleteMessageButtonText = i18n(
       isServerDeletable ? 'unsend' : 'delete'
     );