SHA256
Почта v2: ReceiveOutcomingMessage без авторизации и атомарная вставка пары
This commit is contained in:
@@ -1325,8 +1325,15 @@ export class AuthService {
|
||||
}
|
||||
|
||||
async sendMessagePair({ incomingBlobB64, outgoingBlobB64 }) {
|
||||
const response = await this.ws.request('SendMessagePair', { incomingBlobB64, outgoingBlobB64 });
|
||||
if (response.status !== 200) throw opError('SendMessagePair', response);
|
||||
const body = { incomingBlobB64, outgoingBlobB64 };
|
||||
const primaryOp = 'ReceiveOutcomingMessage';
|
||||
let response = await this.ws.request(primaryOp, body);
|
||||
if (response.status === 404) {
|
||||
response = await this.ws.request('SendMessagePair', body);
|
||||
if (response.status !== 200) throw opError('SendMessagePair', response);
|
||||
return response.payload || {};
|
||||
}
|
||||
if (response.status !== 200) throw opError(primaryOp, response);
|
||||
return response.payload || {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user