Skip to content

Commit 5ce1d64

Browse files
committed
api [nfc]: Better name messageIds parameter on updating flags
These aren't message objects, but rather just the IDs of messages. The name is `messages` in the API, and that'd be a pain to change. But we can at least fix it within our code. All the call sites already use appropriately "ID"-mentioning names.
1 parent b199fd2 commit 5ce1d64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/messages/messagesFlags.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export type ApiResponseMessagesFlags = {|
1010

1111
export default (
1212
auth: Auth,
13-
messages: $ReadOnlyArray<number>,
13+
messageIds: $ReadOnlyArray<number>,
1414
op: string,
1515
flag: UserMessageFlag,
1616
): Promise<ApiResponseMessagesFlags> =>
17-
apiPost(auth, 'messages/flags', { messages: JSON.stringify(messages), flag, op });
17+
apiPost(auth, 'messages/flags', { messages: JSON.stringify(messageIds), flag, op });

0 commit comments

Comments
 (0)