Новая система вложений
This commit is contained in:
@@ -89,7 +89,10 @@ export function DialogInput() {
|
||||
blob: fileContent,
|
||||
id: generateRandomKey(8),
|
||||
type: AttachmentType.FILE,
|
||||
preview: files[0].size + "::" + files[0].name
|
||||
preview: files[0].size + "::" + files[0].name,
|
||||
transport_server: "",
|
||||
transport_tag: "",
|
||||
encoded_for: dialog
|
||||
}]);
|
||||
}
|
||||
});
|
||||
@@ -116,7 +119,10 @@ export function DialogInput() {
|
||||
type: AttachmentType.MESSAGES,
|
||||
id: generateRandomKey(8),
|
||||
blob: JSON.stringify([...replyMessages.messages]),
|
||||
preview: ""
|
||||
preview: "",
|
||||
transport_server: "",
|
||||
transport_tag: "",
|
||||
encoded_for: dialog
|
||||
}]);
|
||||
if(editableDivRef.current){
|
||||
editableDivRef.current.focus();
|
||||
@@ -230,7 +236,10 @@ export function DialogInput() {
|
||||
blob: avatars[0].avatar,
|
||||
id: generateRandomKey(8),
|
||||
type: AttachmentType.AVATAR,
|
||||
preview: ""
|
||||
preview: "",
|
||||
transport_server: "",
|
||||
transport_tag: "",
|
||||
encoded_for: dialog
|
||||
}]);
|
||||
if(editableDivRef.current){
|
||||
editableDivRef.current.focus();
|
||||
@@ -270,7 +279,10 @@ export function DialogInput() {
|
||||
blob: base64Image,
|
||||
id: attachmentId,
|
||||
type: AttachmentType.IMAGE,
|
||||
preview: ""
|
||||
preview: "",
|
||||
transport_server: "",
|
||||
transport_tag: "",
|
||||
encoded_for: dialog
|
||||
}]);
|
||||
}
|
||||
if(editableDivRef.current){
|
||||
@@ -304,7 +316,10 @@ export function DialogInput() {
|
||||
blob: fileContent,
|
||||
id: attachmentId,
|
||||
type: AttachmentType.FILE,
|
||||
preview: files[0].size + "::" + files[0].name
|
||||
preview: files[0].size + "::" + files[0].name,
|
||||
transport_server: "",
|
||||
transport_tag: "",
|
||||
encoded_for: dialog
|
||||
}]);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ export function MessageImage(props: AttachmentProps) {
|
||||
const [blurhashPreview, setBlurhashPreview] = useState("");
|
||||
|
||||
useEffect(() => {
|
||||
console.info(props.attachment);
|
||||
console.info("Consturcting image, download status: " + downloadStatus);
|
||||
constructBlob();
|
||||
constructFromBlurhash();
|
||||
|
||||
Reference in New Issue
Block a user