mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
Merge pull request #546 from Hexastack/refactor/attachment-payload
feat: Refactor attachment payload + use public signed urls in web channel
This commit is contained in:
4
api/src/utils/test/fixtures/block.ts
vendored
4
api/src/utils/test/fixtures/block.ts
vendored
@@ -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: [],
|
||||
|
||||
7
api/src/utils/test/fixtures/content.ts
vendored
7
api/src/utils/test/fixtures/content.ts
vendored
@@ -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,
|
||||
|
||||
@@ -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: [],
|
||||
|
||||
Reference in New Issue
Block a user