SHA256
Исправить синхронизацию прочитанных каналов
This commit is contained in:
@@ -1574,13 +1574,15 @@ export class AuthService {
|
||||
return response.payload || {};
|
||||
}
|
||||
|
||||
async getChannelMessages(channel, limit = 200, sort = 'asc', login = '') {
|
||||
async getChannelMessages(channel, limit = null, sort = 'asc', login = '') {
|
||||
const normalizedChannel = {
|
||||
ownerBlockchainName: String(channel?.ownerBlockchainName || '').trim(),
|
||||
channelRootBlockNumber: Number(channel?.channelRootBlockNumber),
|
||||
channelRootBlockHash: String(channel?.channelRootBlockHash || '').trim(),
|
||||
};
|
||||
const payload = { channel: normalizedChannel, limit, sort };
|
||||
const payload = { channel: normalizedChannel, sort };
|
||||
const cleanLimit = Number(limit);
|
||||
if (Number.isFinite(cleanLimit) && cleanLimit > 0) payload.limit = Math.trunc(cleanLimit);
|
||||
const cleanLogin = String(login || '').trim();
|
||||
if (cleanLogin) payload.login = cleanLogin;
|
||||
const response = await this.ws.request('GetChannelMessages', payload);
|
||||
|
||||
Reference in New Issue
Block a user