chore: fix typo and update session foundation contact

pull/3281/head
Audric Ackermann 11 months ago
parent cd49729779
commit 1f0510546f
No known key found for this signature in database

@ -5,8 +5,8 @@
"version": "1.15.0",
"license": "GPL-3.0",
"author": {
"name": "Oxen Labs",
"email": "team@oxen.io"
"name": "Session Foundation",
"email": "contact@session.foundation"
},
"repository": {
"type": "git",

@ -46,8 +46,7 @@ function cleanAttachments(decryptedDataMessage: SignalService.DataMessage) {
// Here we go from binary to string/base64 in all AttachmentPointer digest/key fields
// we do not care about group on Session Desktop
// we do not care about the group field on Session Desktop
decryptedDataMessage.group = null;
// when receiving a message we get keys of attachment as buffer, but we override the data with the decrypted string instead.

@ -167,7 +167,7 @@ async function handleRequestDetail(
envelope.messageHash = messageHash;
try {
// NOTE: Annoyngly we add plaintext to the cache
// NOTE: Annoyingly we add plaintext to the cache
// after we've already processed some of it (thus the
// need to handle senderIdentity separately)...
perfStart(`addToCache-${envelope.id}`);

@ -6,41 +6,8 @@
import { isNumber } from 'lodash';
import { BatchRequests } from './batchRequest';
import { Snode } from '../../../data/types';
import { NetworkTimeSubRequest } from './SnodeRequestTypes';
import { NetworkTime } from '../../../util/NetworkTime';
const getNetworkTime = async (snode: Snode): Promise<string | number> => {
const subRequest = new NetworkTimeSubRequest();
const result = await BatchRequests.doUnsignedSnodeBatchRequestNoRetries(
[subRequest],
snode,
10000,
null,
false
);
if (!result || !result.length) {
window?.log?.warn(`getNetworkTime on ${snode.ip}:${snode.port} returned falsy value`, result);
throw new Error('getNetworkTime: Invalid result');
}
const firstResult = result[0];
if (firstResult.code !== 200) {
window?.log?.warn('Status is not 200 for getNetworkTime but: ', firstResult.code);
throw new Error('getNetworkTime: Invalid status code');
}
const timestamp = firstResult?.body?.timestamp;
if (!timestamp) {
throw new Error(`getNetworkTime returned invalid timestamp: ${timestamp}`);
}
GetNetworkTime.handleTimestampOffsetFromNetwork('getNetworkTime', timestamp);
return timestamp;
};
function handleTimestampOffsetFromNetwork(_request: string, snodeTimestamp: number) {
if (snodeTimestamp && isNumber(snodeTimestamp) && snodeTimestamp > 1609419600 * 1000) {
// first january 2021. Arbitrary, just want to make sure the return timestamp is somehow valid and not some crazy low value
@ -50,6 +17,5 @@ function handleTimestampOffsetFromNetwork(_request: string, snodeTimestamp: numb
}
export const GetNetworkTime = {
getNetworkTime,
handleTimestampOffsetFromNetwork,
};

@ -5,7 +5,7 @@ import {
/**
* Try to decrypt the content with any type of encryption domains we know.
* Does not throw, will return null if we couldn't decrypt it successfuly.
* Does not throw, will return null if we couldn't decrypt it successfully.
*/
async function multiDecryptAnyEncryptionDomain({
encoded,

@ -27,7 +27,7 @@ export enum AccountRestoration {
Finished,
/** we failed to fetch account details in time, so we enter it manually */
DisplayName,
/** we have restored successfuly, show the conversation screen */
/** we have restored successfully, show the conversation screen */
Complete,
}

@ -299,7 +299,7 @@ describe('PendingMessageCache', () => {
Buffer.compare(message.plainTextBuffer, addedMessage.plainTextBuffer) === 0;
expect(buffersCompare).to.equal(true, 'buffers were not loaded properly from database');
// Compare all other valures
// Compare all other values
const trimmedAdded = _.omit(addedMessage, ['plainTextBuffer', 'plainTextBufferHex']);
const trimmedRebuilt = _.omit(message, ['plainTextBuffer', 'plainTextBufferHex']);

Loading…
Cancel
Save