Merge pull request #546 from Hexastack/refactor/attachment-payload
Some checks are pending
Build and Push Docker API Image / build-and-push (push) Waiting to run
Build and Push Docker Base Image / build-and-push (push) Waiting to run
Build and Push Docker UI Image / build-and-push (push) Waiting to run

feat: Refactor attachment payload + use public signed urls in web channel
This commit is contained in:
Med Marrouchi
2025-01-14 19:12:00 +01:00
committed by GitHub
38 changed files with 692 additions and 576 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright © 2024 Hexastack. All rights reserved.
* Copyright © 2025 Hexastack. All rights reserved.
*
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
@@ -142,7 +142,7 @@ export const blocks: TBlockFixtures['values'][] = [
attachment: {
type: FileType.image,
payload: {
attachment_id: '1',
id: '1',
},
},
quickReplies: [],

View File

@@ -105,7 +105,7 @@ const contents: TContentFixtures['values'][] = [
image: {
type: 'image',
payload: {
attachment_id: null,
id: null,
},
},
},
@@ -117,7 +117,7 @@ const contents: TContentFixtures['values'][] = [
image: {
type: 'image',
payload: {
attachment_id: null,
id: null,
},
},
},
@@ -154,8 +154,7 @@ export const installContentFixtures = async () => {
({ name }) => name === `${contentFixture.title.replace(' ', '')}.jpg`,
);
if (attachment) {
contentFixture.dynamicFields.image.payload.attachment_id =
attachment.id;
contentFixture.dynamicFields.image.payload.id = attachment.id;
}
return {
...contentFixture,

View File

@@ -1,5 +1,5 @@
/*
* Copyright © 2024 Hexastack. All rights reserved.
* Copyright © 2025 Hexastack. All rights reserved.
*
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
@@ -191,7 +191,7 @@ export const attachmentBlock: BlockFull = {
type: FileType.image,
payload: {
url: 'https://fr.facebookbrand.com/wp-content/uploads/2016/09/messenger_icon2.png',
attachment_id: '1234',
id: '1234',
},
},
quickReplies: [],