Scheduled Messages: Fix duplicated sending (#4513)
This commit is contained in:
parent
8b19d5e72c
commit
42c504f805
@ -567,6 +567,7 @@ const MessageList: FC<OwnProps & StateProps> = ({
|
||||
const withUsers = Boolean((!isPrivate && !isChannelChat) || isChatWithSelf || isRepliesChat || isAnonymousForwards);
|
||||
const noAvatars = Boolean(!withUsers || isChannelChat);
|
||||
const shouldRenderGreeting = isUserId(chatId) && !isChatWithSelf && !isBot && !isAnonymousForwards
|
||||
&& type === 'thread'
|
||||
&& (
|
||||
(
|
||||
!messageGroups && !lastMessage && messageIds
|
||||
|
||||
@ -700,7 +700,8 @@ export default memo(withGlobal<OwnProps>(
|
||||
&& !isMessageUnread
|
||||
&& readDateExpiresAt
|
||||
&& message.date > Date.now() / 1000 - readDateExpiresAt
|
||||
&& !userStatus?.isReadDateRestricted,
|
||||
&& !userStatus?.isReadDateRestricted
|
||||
&& messageListType !== 'scheduled',
|
||||
);
|
||||
const shouldRenderShowWhen = Boolean(
|
||||
canLoadReadDate && isPrivate && selectUserStatus(global, chat.id)?.isReadDateRestrictedByMe,
|
||||
|
||||
@ -419,7 +419,19 @@ export function deleteChatScheduledMessages<T extends GlobalState>(
|
||||
});
|
||||
}
|
||||
|
||||
global = updateScheduledMessages(global, chatId, newById);
|
||||
global = {
|
||||
...global,
|
||||
scheduledMessages: {
|
||||
byChatId: {
|
||||
...global.scheduledMessages.byChatId,
|
||||
[chatId]: {
|
||||
byId: {
|
||||
...newById,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
return global;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user