Обновление протокола вложений
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { chacha20Decrypt, decodeWithPassword, decrypt, generateMd5 } from '@/app/workers/crypto/crypto';
|
||||
import { useDatabase } from '@/app/providers/DatabaseProvider/useDatabase';
|
||||
import { createContext, useEffect, useRef, useState } from 'react';
|
||||
import { Attachment, AttachmentEncoding, AttachmentType, PacketMessage } from '@/app/providers/ProtocolProvider/protocol/packets/packet.message';
|
||||
import { Attachment, AttachmentEncoding, AttachmentTransport, AttachmentType, PacketMessage } from '@/app/providers/ProtocolProvider/protocol/packets/packet.message';
|
||||
import { usePrivatePlain } from '../AccountProvider/usePrivatePlain';
|
||||
import { usePublicKey } from '../AccountProvider/usePublicKey';
|
||||
import { PacketRead } from '@/app/providers/ProtocolProvider/protocol/packets/packet.read';
|
||||
@@ -46,9 +46,8 @@ export interface AttachmentMeta {
|
||||
id: string;
|
||||
type: AttachmentType;
|
||||
preview: string;
|
||||
transport_tag: string;
|
||||
transport: AttachmentTransport;
|
||||
encoding: AttachmentEncoding;
|
||||
transport_server: string;
|
||||
}
|
||||
|
||||
export interface Message {
|
||||
@@ -960,8 +959,7 @@ export function DialogProvider(props: DialogProviderProps) {
|
||||
blob: blob,
|
||||
type: meta.type,
|
||||
preview: meta.preview,
|
||||
transport_server: meta.transport_server,
|
||||
transport_tag: meta.transport_tag,
|
||||
transport: meta.transport,
|
||||
encoding: meta.encoding
|
||||
});
|
||||
}
|
||||
|
||||
@@ -119,8 +119,7 @@ export function useDialog() : {
|
||||
id: attachment.id,
|
||||
type: attachment.type,
|
||||
preview: attachment.preview,
|
||||
transport_server: attachment.transport_server,
|
||||
transport_tag: attachment.transport_tag,
|
||||
transport: attachment.transport,
|
||||
encoding: attachment.encoding
|
||||
});
|
||||
if(attachment.type == AttachmentType.FILE){
|
||||
|
||||
@@ -192,8 +192,7 @@ export function useSynchronize() {
|
||||
type: attachment.type,
|
||||
preview: attachment.preview,
|
||||
encoding: attachment.encoding,
|
||||
transport_server: attachment.transport_server,
|
||||
transport_tag: attachment.transport_tag
|
||||
transport: attachment.transport
|
||||
});
|
||||
}
|
||||
|
||||
@@ -377,8 +376,7 @@ export function useSynchronize() {
|
||||
type: attachment.type,
|
||||
preview: attachment.preview,
|
||||
encoding: attachment.encoding,
|
||||
transport_server: attachment.transport_server,
|
||||
transport_tag: attachment.transport_tag
|
||||
transport: attachment.transport
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user