Comments: Periodically update recent repliers and unreads (#2845)
This commit is contained in:
parent
f7ff7bf598
commit
2948c395b1
@ -70,6 +70,7 @@ import { interpolateArray } from '../../../util/waveform';
|
||||
import { requestChatUpdate } from './chats';
|
||||
import { getEmojiOnlyCountForMessage } from '../../../global/helpers/getEmojiOnlyCountForMessage';
|
||||
import { getServerTimeOffset } from '../../../util/serverTime';
|
||||
import { getApiChatIdFromMtpPeer } from '../apiBuilders/peers';
|
||||
|
||||
const FAST_SEND_TIMEOUT = 1000;
|
||||
const INPUT_WAVEFORM_LENGTH = 63;
|
||||
@ -883,6 +884,9 @@ export async function fetchMessageViews({
|
||||
views,
|
||||
forwards,
|
||||
messagesCount: replies?.replies,
|
||||
recentReplierIds: replies?.recentRepliers?.map(getApiChatIdFromMtpPeer),
|
||||
maxId: replies?.maxId,
|
||||
readMaxId: replies?.readMaxId,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
@ -1488,6 +1488,9 @@ addActionHandler('loadMessageViews', async (global, actions, payload): Promise<v
|
||||
|
||||
global = updateThreadInfo(global, repliesChatId, threadId, {
|
||||
messagesCount: update.messagesCount,
|
||||
recentReplierIds: update.recentReplierIds,
|
||||
lastMessageId: update.maxId,
|
||||
lastReadInboxMessageId: update.readMaxId,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user