Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3351871
D7940.id26864.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
882 B
Referenced Files
None
Subscribers
None
D7940.id26864.diff
View Options
diff --git a/lib/shared/edit-messages-utils.js b/lib/shared/edit-messages-utils.js
--- a/lib/shared/edit-messages-utils.js
+++ b/lib/shared/edit-messages-utils.js
@@ -1,6 +1,5 @@
// @flow
-import invariant from 'invariant';
import * as React from 'react';
import { threadIsPending, threadHasPermission } from './thread-utils.js';
@@ -23,7 +22,7 @@
import { useSelector } from '../utils/redux-utils.js';
function useEditMessage(): (
- messageID?: string,
+ messageID: string,
newText: string,
) => Promise<SendEditMessageResult> {
const callEditMessage = useServerCall(sendEditMessage);
@@ -31,8 +30,6 @@
return React.useCallback(
(messageID, newText) => {
- invariant(messageID, 'messageID should be set!');
-
const editMessagePromise = (async () => {
const result = await callEditMessage({
targetMessageID: messageID,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 3:54 AM (20 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2573788
Default Alt Text
D7940.id26864.diff (882 B)
Attached To
Mode
D7940: [lib] Make messageID in useEditMessage mandatory
Attached
Detach File
Event Timeline
Log In to Comment