Page MenuHomePhabricator

D9634.id32503.diff
No OneTemporary

D9634.id32503.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
Mon, Dec 2, 2:33 PM (20 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2607878
Default Alt Text
D9634.id32503.diff (1 KB)

Event Timeline