Page MenuHomePhabricator

D7129.id24063.diff
No OneTemporary

D7129.id24063.diff

diff --git a/lib/actions/message-actions.js b/lib/actions/message-actions.js
--- a/lib/actions/message-actions.js
+++ b/lib/actions/message-actions.js
@@ -239,6 +239,12 @@
};
};
+const sendEditMessageActionTypes = Object.freeze({
+ started: 'SEND_EDIT_MESSAGE_STARTED',
+ success: 'SEND_EDIT_MESSAGE_SUCCESS',
+ failed: 'SEND_EDIT_MESSAGE_FAILED',
+});
+
const saveMessagesActionType = 'SAVE_MESSAGES';
const processMessagesActionType = 'PROCESS_MESSAGES';
const messageStorePruneActionType = 'MESSAGE_STORE_PRUNE';
@@ -261,4 +267,5 @@
saveMessagesActionType,
processMessagesActionType,
messageStorePruneActionType,
+ sendEditMessageActionTypes,
};
diff --git a/lib/types/message-types.js b/lib/types/message-types.js
--- a/lib/types/message-types.js
+++ b/lib/types/message-types.js
@@ -572,6 +572,8 @@
+newMessageInfos: $ReadOnlyArray<RawMessageInfo>,
};
+export type EditMessagePayload = SendEditMessageResponse;
+
// Used for the message info included in log-in type actions
export type GenericMessagesResult = {
+messageInfos: RawMessageInfo[],
diff --git a/lib/types/redux-types.js b/lib/types/redux-types.js
--- a/lib/types/redux-types.js
+++ b/lib/types/redux-types.js
@@ -41,6 +41,7 @@
RawMultimediaMessageInfo,
FetchMessageInfosPayload,
SendMessagePayload,
+ EditMessagePayload,
SaveMessagesPayload,
NewMessagesPayload,
MessageStorePrunePayload,
@@ -555,6 +556,27 @@
+payload: SendMessagePayload,
+loadingInfo: LoadingInfo,
}
+ | {
+ +type: 'SEND_EDIT_MESSAGE_STARTED',
+ +loadingInfo?: LoadingInfo,
+ +payload?: void,
+ }
+ | {
+ +type: 'SEND_EDIT_MESSAGE_FAILED',
+ +error: true,
+ +payload: Error & {
+ +threadID: string,
+ +targetMessageID: string,
+ +text: string,
+ ...
+ },
+ +loadingInfo: LoadingInfo,
+ }
+ | {
+ +type: 'SEND_EDIT_MESSAGE_SUCCESS',
+ +payload: EditMessagePayload,
+ +loadingInfo: LoadingInfo,
+ }
| {
+type: 'SEARCH_USERS_STARTED',
+payload?: void,

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 5:46 PM (21 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2591227
Default Alt Text
D7129.id24063.diff (2 KB)

Event Timeline