Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32164258
D15333.1765047933.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D15333.1765047933.diff
View Options
diff --git a/lib/shared/reaction-utils.js b/lib/shared/reaction-utils.js
--- a/lib/shared/reaction-utils.js
+++ b/lib/shared/reaction-utils.js
@@ -17,6 +17,7 @@
ComposableMessageInfo,
RobotextMessageInfo,
} from '../types/message-types.js';
+import { isComposableMessageType } from '../types/message-types.js';
import type { ThreadInfo } from '../types/minimally-encoded-thread-permissions-types.js';
import { threadPermissions } from '../types/thread-permission-types.js';
import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
@@ -96,11 +97,12 @@
return false;
}
+ const protocol = threadSpecs[threadInfo.type].protocol();
if (
!targetMessageInfo ||
- (!targetMessageInfo.id &&
- !threadSpecs[threadInfo.type].protocol()
- .canActionsTargetPendingMessages) ||
+ (!targetMessageInfo.id && !protocol.canActionsTargetPendingMessages) ||
+ (!isComposableMessageType(targetMessageInfo.type) &&
+ !protocol.canReactToRobotext) ||
(threadInfo.sourceMessageID &&
threadInfo.sourceMessageID === targetMessageInfo.id)
) {
diff --git a/lib/shared/threads/protocols/dm-thread-protocol.js b/lib/shared/threads/protocols/dm-thread-protocol.js
--- a/lib/shared/threads/protocols/dm-thread-protocol.js
+++ b/lib/shared/threads/protocols/dm-thread-protocol.js
@@ -935,6 +935,7 @@
},
supportsBackgroundNotifs: true,
viewerCanUpdateOwnRole: false,
+ canReactToRobotext: true,
});
function pendingThreadType(numberOfOtherMembers: number) {
diff --git a/lib/shared/threads/protocols/farcaster-thread-protocol.js b/lib/shared/threads/protocols/farcaster-thread-protocol.js
--- a/lib/shared/threads/protocols/farcaster-thread-protocol.js
+++ b/lib/shared/threads/protocols/farcaster-thread-protocol.js
@@ -807,6 +807,7 @@
},
supportsBackgroundNotifs: false,
viewerCanUpdateOwnRole: false,
+ canReactToRobotext: false,
};
function pendingThreadType(numberOfOtherMembers: number) {
diff --git a/lib/shared/threads/protocols/keyserver-thread-protocol.js b/lib/shared/threads/protocols/keyserver-thread-protocol.js
--- a/lib/shared/threads/protocols/keyserver-thread-protocol.js
+++ b/lib/shared/threads/protocols/keyserver-thread-protocol.js
@@ -738,6 +738,7 @@
},
supportsBackgroundNotifs: true,
viewerCanUpdateOwnRole: true,
+ canReactToRobotext: true,
});
function pendingThreadType(numberOfOtherMembers: number) {
diff --git a/lib/shared/threads/thread-spec.js b/lib/shared/threads/thread-spec.js
--- a/lib/shared/threads/thread-spec.js
+++ b/lib/shared/threads/thread-spec.js
@@ -511,6 +511,7 @@
},
+supportsBackgroundNotifs: boolean,
+viewerCanUpdateOwnRole: boolean,
+ +canReactToRobotext: boolean,
};
export type ThreadSpec<
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 6, 7:05 PM (5 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5840291
Default Alt Text
D15333.1765047933.diff (2 KB)
Attached To
Mode
D15333: [lib] Disable reacting to robotext on Farcaster
Attached
Detach File
Event Timeline
Log In to Comment