@ -39,10 +39,6 @@ window.isBehindProxy = () => Boolean(config.proxyUrl);
window.lokiFeatureFlags = {
useOnionRequests: true,
useFileOnionRequests: true,
useFileOnionRequestsV2: true, // more compact encoding of files in response
padOutgoingAttachments: true,
enablePinConversations: true,
useCallMessage: false,
};
@ -147,7 +147,7 @@ export const getPinConversationMenuItem = (conversationId: string): JSX.Element
const isMessagesSection = useSelector(getFocusedSection) === SectionType.Message;
const nbOfAlreadyPinnedConvos = useSelector(getNumberOfPinnedConversations);
if (isMessagesSection && window.lokiFeatureFlags.enablePinConversations) {
if (isMessagesSection) {
const conversation = getConversationController().get(conversationId);
const isPinned = conversation.isPinned();
@ -695,7 +695,7 @@ export const TEST_getMinTimeout = () => 500;
*/
// tslint:disable-next-line: max-func-body-length
export const networkDeleteMessages = async (
hashes: Array<string>,
hashes: Array<string>
): Promise<Array<string> | null> => {
const sodium = await getSodium();
const userX25519PublicKey = UserUtils.getOurPubKeyStrFromCache();
@ -125,7 +125,7 @@ async function buildOnionCtxs(
const isCallToPn =
finalRelayOptions?.host === hrefPnServerDev || finalRelayOptions?.host === hrefPnServerProd;
if (!isCallToPn && window.lokiFeatureFlags.useFileOnionRequestsV2) {
if (!isCallToPn) {
target = '/loki/v3/lsrpc';
}
@ -69,10 +69,7 @@ export class AttachmentFsV2Utils {
pointer.key = new Uint8Array(crypto.randomBytes(64));
const iv = new Uint8Array(crypto.randomBytes(16));
const dataToEncrypt =
!shouldPad || !window.lokiFeatureFlags.padOutgoingAttachments
? attachment.data
: addAttachmentPadding(attachment.data);
const dataToEncrypt = !shouldPad ? attachment.data : addAttachmentPadding(attachment.data);
const data = await window.textsecure.crypto.encryptAttachment(
dataToEncrypt,
pointer.key.buffer,
@ -38,8 +38,7 @@ export async function uploadV2(params: UploadParamsV2): Promise<AttachmentPointe
caption: attachment.caption,
const paddedAttachment: ArrayBuffer =
window.lokiFeatureFlags.padOutgoingAttachments && !openGroup
const paddedAttachment: ArrayBuffer = !openGroup
? addAttachmentPadding(attachment.data)
: attachment.data;
@ -43,10 +43,6 @@ declare global {
log: any;
lokiFeatureFlags: {
useOnionRequests: boolean;
useFileOnionRequests: boolean;
useFileOnionRequestsV2: boolean;
padOutgoingAttachments: boolean;
enablePinConversations: boolean;
useCallMessage: boolean;
lokiSnodeAPI: LokiSnodeAPI;