Message: Fix edit handling (#2686)
This commit is contained in:
parent
9ccc7e3ff9
commit
3d70b46504
@ -188,6 +188,9 @@ addActionHandler('apiUpdate', (global, actions, update): ActionReturnType => {
|
||||
case 'updateMessage': {
|
||||
const { chatId, id, message } = update;
|
||||
|
||||
const currentMessage = selectChatMessage(global, chatId, id);
|
||||
const chat = selectChat(global, chatId);
|
||||
|
||||
global = updateWithLocalMedia(global, chatId, id, message);
|
||||
|
||||
const newMessage = selectChatMessage(global, chatId, id)!;
|
||||
@ -200,9 +203,6 @@ addActionHandler('apiUpdate', (global, actions, update): ActionReturnType => {
|
||||
);
|
||||
}
|
||||
|
||||
const currentMessage = selectChatMessage(global, chatId, id);
|
||||
const chat = selectChat(global, chatId);
|
||||
|
||||
if (currentMessage) {
|
||||
global = updateChatLastMessage(global, chatId, newMessage);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user