Page MenuHomePhabricator

D9544.diff
No OneTemporary

D9544.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
@@ -242,10 +242,11 @@
props.item.threadInfo,
props.item.messageInfo,
);
- const canTogglePins = threadHasPermission(
- props.item.threadInfo,
- threadPermissions.MANAGE_PINS,
- );
+ const canTogglePins =
+ threadHasPermission(
+ props.item.threadInfo,
+ threadPermissions.MANAGE_PINS,
+ ) && 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
@@ -291,10 +291,11 @@
useCanEditMessageNative(props.item.threadInfo, props.item.messageInfo) &&
!isThisMessageEdited;
- const canTogglePins = threadHasPermission(
- props.item.threadInfo,
- threadPermissions.MANAGE_PINS,
- );
+ const canTogglePins =
+ threadHasPermission(
+ props.item.threadInfo,
+ threadPermissions.MANAGE_PINS,
+ ) && props.item.threadInfo.sourceMessageID !== props.item.messageInfo.id;
React.useEffect(() => clearMarkdownContextData, [clearMarkdownContextData]);
diff --git a/web/utils/tooltip-action-utils.js b/web/utils/tooltip-action-utils.js
--- a/web/utils/tooltip-action-utils.js
+++ b/web/utils/tooltip-action-utils.js
@@ -276,7 +276,8 @@
const canTogglePin =
!isInvalidPinSource(messageInfo) &&
- threadHasPermission(threadInfo, threadPermissions.MANAGE_PINS);
+ threadHasPermission(threadInfo, threadPermissions.MANAGE_PINS) &&
+ threadInfo.sourceMessageID !== item.messageInfo.id;
const inputState = React.useContext(InputStateContext);

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 2, 11:43 AM (21 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2607467
Default Alt Text
D9544.diff (1 KB)

Event Timeline