Clears @mentions when clearing draft

This commit is contained in:
Josh Perez 2023-01-03 17:35:59 -05:00 committed by GitHub
parent add184d0da
commit 476006af96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View file

@ -4160,9 +4160,10 @@ export class ConversationModel extends window.Backbone
? {}
: {
draft: '',
draftBodyRanges: [],
draftTimestamp: null,
lastMessage: model.getNotificationText(),
lastMessageAuthor: model.getAuthorText(),
lastMessage: model.getNotificationText(),
lastMessageStatus: 'sending' as const,
};

View file

@ -74,6 +74,7 @@ import { useBoundActions } from '../../hooks/useBoundActions';
import { scrollToMessage } from './conversations';
import type { ScrollToMessageActionType } from './conversations';
import { longRunningTaskWrapper } from '../../util/longRunningTaskWrapper';
import { drop } from '../../util/drop';
// State
@ -384,12 +385,15 @@ function sendMultiMediaMessage(
{
sendHQImages,
timestamp,
// We rely on enqueueMessageForSend to call these within redux's batch
extraReduxActions: () => {
conversation.setMarkedUnread(false);
resetLinkPreview();
void clearConversationDraftAttachments(
conversationId,
draftAttachments
drop(
clearConversationDraftAttachments(
conversationId,
draftAttachments
)
);
setQuoteByMessageId(conversationId, undefined)(
dispatch,