add some logs for message sending

pull/1424/head
Audric Ackermann 4 years ago
parent e6c2abff48
commit 19f59ca41e
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -45,7 +45,7 @@ export async function send(
timestamp, timestamp,
cipherText cipherText
); );
// window.log.warn('sending', envelope, ' to ', device.key); window.log.debug('Sending envelope', envelope, ' to ', device.key);
const data = wrapEnvelope(envelope); const data = wrapEnvelope(envelope);
return pRetry( return pRetry(

@ -11,6 +11,7 @@ export async function toRawMessage(
): Promise<RawMessage> { ): Promise<RawMessage> {
const timestamp = message.timestamp; const timestamp = message.timestamp;
const ttl = message.ttl(); const ttl = message.ttl();
window.log.debug('toRawMessage proto:', message.contentProto());
const plainTextBuffer = message.plainTextBuffer(); const plainTextBuffer = message.plainTextBuffer();
let encryption: EncryptionType; let encryption: EncryptionType;

@ -76,7 +76,6 @@ class StubAppDotNetAPI extends LokiAppDotNetServerAPI {
options: { method?: string } = {} options: { method?: string } = {}
) { ) {
const { method } = options; const { method } = options;
// console.warn('STUBBED ', method, ':', endpoint);
if ( if (
endpoint === 'loki/v1/rss/messenger' || endpoint === 'loki/v1/rss/messenger' ||

@ -18,15 +18,13 @@ class StubMessageAPI {
ttl: number, ttl: number,
options = {} options = {}
) { ) {
// console.warn('STUBBED message api ', pubKey, ttl);
const post = { const post = {
method: 'POST', method: 'POST',
}; };
const data64 = StringUtils.decode(data, 'base64'); const data64 = StringUtils.decode(data, 'base64');
await fetch( await fetch(
`${ `${this.baseUrl
this.baseUrl
}/messages?pubkey=${pubKey}&timestamp=${messageTimeStamp}&data=${encodeURIComponent( }/messages?pubkey=${pubKey}&timestamp=${messageTimeStamp}&data=${encodeURIComponent(
data64 data64
)}`, )}`,

Loading…
Cancel
Save