Page MenuHomePhabricator

D9634.diff
No OneTemporary

D9634.diff

diff --git a/native/chat/multimedia-message.react.js b/native/chat/multimedia-message.react.js
--- a/native/chat/multimedia-message.react.js
+++ b/native/chat/multimedia-message.react.js
@@ -9,7 +9,7 @@
import * as React from 'react';
import { View } from 'react-native';
-import { messageKey } from 'lib/shared/message-utils.js';
+import { isInvalidPinSource, messageKey } from 'lib/shared/message-utils.js';
import {
threadHasPermission,
useCanCreateSidebarFromMessage,
@@ -243,10 +243,12 @@
props.item.messageInfo,
);
const canTogglePins =
+ !isInvalidPinSource(props.item.messageInfo) &&
threadHasPermission(
props.item.threadInfo,
threadPermissions.MANAGE_PINS,
- ) && props.item.threadInfo.sourceMessageID !== props.item.messageInfo.id;
+ ) &&
+ props.item.threadInfo.sourceMessageID !== props.item.messageInfo.id;
return (
<MultimediaMessage
diff --git a/native/chat/text-message.react.js b/native/chat/text-message.react.js
--- a/native/chat/text-message.react.js
+++ b/native/chat/text-message.react.js
@@ -4,7 +4,7 @@
import * as React from 'react';
import { View } from 'react-native';
-import { messageKey } from 'lib/shared/message-utils.js';
+import { isInvalidPinSource, messageKey } from 'lib/shared/message-utils.js';
import {
threadHasPermission,
useCanCreateSidebarFromMessage,
@@ -292,10 +292,12 @@
!isThisMessageEdited;
const canTogglePins =
+ !isInvalidPinSource(props.item.messageInfo) &&
threadHasPermission(
props.item.threadInfo,
threadPermissions.MANAGE_PINS,
- ) && props.item.threadInfo.sourceMessageID !== props.item.messageInfo.id;
+ ) &&
+ props.item.threadInfo.sourceMessageID !== props.item.messageInfo.id;
React.useEffect(() => clearMarkdownContextData, [clearMarkdownContextData]);

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 14, 7:36 PM (5 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2492263
Default Alt Text
D9634.diff (1 KB)

Event Timeline