Chat Info: Fix repeated participants fetching (#2512)

This commit is contained in:
Alexander Zinchuk 2023-02-08 00:47:52 +01:00
parent 3f7392699a
commit 857abf4048
3 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,7 @@ const LOG_BACKGROUND = '#111111DD';
const LOG_PREFIX_COLOR = '#E4D00A';
const LOG_SUFFIX = {
INVOKE: '#49DBF5',
'INVOKE RESPONSE': '#6887F7',
RESPONSE: '#6887F7',
CONNECTING: '#E4D00A',
CONNECTED: '#26D907',
'CONNECTING ERROR': '#D1191C',

View File

@ -225,7 +225,7 @@ export async function invokeRequest<T extends GramJs.AnyRequest>(
const result = await client.invoke(request, dcId);
if (DEBUG) {
log('INVOKE RESPONSE', request.className, result);
log('RESPONSE', request.className, result);
}
if (!shouldIgnoreUpdates) {

View File

@ -1445,6 +1445,8 @@ addActionHandler('loadMoreMembers', async (global, actions, payload): Promise<vo
}
const offset = (chat.fullInfo?.members?.length) || undefined;
if (offset !== undefined && chat.membersCount !== undefined && offset >= chat.membersCount) return;
const result = await callApi('fetchMembers', chat.id, chat.accessHash!, 'recent', offset);
if (!result) {
return;