Chat Info: Fix repeated participants fetching (#2512)
This commit is contained in:
parent
3f7392699a
commit
857abf4048
@ -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',
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user