|
|
@ -20,7 +20,6 @@ import { getConversationController } from '../conversations';
|
|
|
|
import { ed25519Str } from '../onions/onionPath';
|
|
|
|
import { ed25519Str } from '../onions/onionPath';
|
|
|
|
import { EmptySwarmError } from '../utils/errors';
|
|
|
|
import { EmptySwarmError } from '../utils/errors';
|
|
|
|
import ByteBuffer from 'bytebuffer';
|
|
|
|
import ByteBuffer from 'bytebuffer';
|
|
|
|
import { getHasSeenHF190, getHasSeenHF191 } from '../apis/snode_api/hfHandling';
|
|
|
|
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
sendMessageOnionV4BlindedRequest,
|
|
|
|
sendMessageOnionV4BlindedRequest,
|
|
|
|
sendSogsMessageOnionV4,
|
|
|
|
sendSogsMessageOnionV4,
|
|
|
@ -144,17 +143,18 @@ export async function sendMessageToSnode(
|
|
|
|
const conversation = getConversationController().get(pubKey);
|
|
|
|
const conversation = getConversationController().get(pubKey);
|
|
|
|
const isClosedGroup = conversation?.isClosedGroup();
|
|
|
|
const isClosedGroup = conversation?.isClosedGroup();
|
|
|
|
|
|
|
|
|
|
|
|
const hardfork190Happened = await getHasSeenHF190();
|
|
|
|
// const hardfork190Happened = await getHasSeenHF190();
|
|
|
|
const hardfork191Happened = await getHasSeenHF191();
|
|
|
|
// const hardfork191Happened = await getHasSeenHF191();
|
|
|
|
const namespace = isClosedGroup ? -10 : 0;
|
|
|
|
const namespace = isClosedGroup ? -10 : 0;
|
|
|
|
|
|
|
|
|
|
|
|
window?.log?.debug(
|
|
|
|
// we could get rid of those now, but lets keep it in case we ever need to use the HF value again
|
|
|
|
`Sending envelope with timestamp: ${timestamp} to ${ed25519Str(pubKey)} size base64: ${
|
|
|
|
// window?.log?.debug(
|
|
|
|
data64.length
|
|
|
|
// `Sending envelope with timestamp: ${timestamp} to ${ed25519Str(pubKey)} size base64: ${
|
|
|
|
}; hardfork190Happened:${hardfork190Happened}; hardfork191Happened:${hardfork191Happened} to namespace:${namespace}`
|
|
|
|
// data64.length
|
|
|
|
);
|
|
|
|
// }; hardfork190Happened:${hardfork190Happened}; hardfork191Happened:${hardfork191Happened} to namespace:${namespace}`
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
|
|
const isBetweenBothHF = hardfork190Happened && !hardfork191Happened;
|
|
|
|
const isBetweenBothHF = false; //hardfork190Happened && !hardfork191Happened;
|
|
|
|
|
|
|
|
|
|
|
|
// send parameters
|
|
|
|
// send parameters
|
|
|
|
const params = {
|
|
|
|
const params = {
|
|
|
|