Skip to content

Commit 06fbb0e

Browse files
authored
runfix: use correct key for asset conversation id [WPB-20666] @V-Gira (#19683)
* runfix: use correct key for asset conversation id [WPB-20666] * bump core to 46.39.10 * update tests
1 parent 3b5c1ba commit 06fbb0e

File tree

5 files changed

+15
-18
lines changed

5 files changed

+15
-18
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@wireapp/avs": "10.2.7",
1717
"@wireapp/avs-debugger": "0.0.7",
1818
"@wireapp/commons": "5.4.5",
19-
"@wireapp/core": "46.39.7",
19+
"@wireapp/core": "46.39.10",
2020
"@wireapp/kalium-backup": "0.0.4",
2121
"@wireapp/promise-queue": "2.4.5",
2222
"@wireapp/react-ui-kit": "9.68.0",

src/script/repositories/assets/AssetRepository.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ describe('AssetRepository', () => {
145145
it('uploads assets with audit log enabled when specified if required metadata is present', async () => {
146146
isAuditLogEnabled = true;
147147
const assetAuditData = {
148-
conversationId: {domain: 'domain', id: 'id'},
148+
convId: {domain: 'domain', id: 'id'},
149149
filename: 'filename',
150150
filetype: 'filetype',
151151
};
@@ -167,7 +167,7 @@ describe('AssetRepository', () => {
167167
it('does not upload asset when audit log is enabled and required metadata is missing', async () => {
168168
isAuditLogEnabled = true;
169169
const assetAuditData = {
170-
conversationId: {domain: 'domain', id: 'id'},
170+
convId: {domain: 'domain', id: 'id'},
171171
filename: 'filename',
172172
filetype: '',
173173
};

src/script/repositories/assets/AssetRepository.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,7 @@ export class AssetRepository {
252252

253253
if (isAuditLogEnabled) {
254254
const isIncompleteAuditData =
255-
!options.auditData ||
256-
!options.auditData.conversationId ||
257-
!options.auditData.filename ||
258-
!options.auditData.filetype;
255+
!options.auditData || !options.auditData.convId || !options.auditData.filename || !options.auditData.filetype;
259256
if (isIncompleteAuditData) {
260257
this.removeFromUploadQueue(messageId);
261258
throw new Error('Audit data is incomplete, file cannot be uploaded');

src/script/repositories/conversation/MessageRepository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ export class MessageRepository {
709709

710710
const auditData: AssetAuditData | undefined = isAuditLogEnabled
711711
? {
712-
conversationId: conversation.qualifiedId,
712+
convId: conversation.qualifiedId,
713713
filename: meta.name,
714714
filetype: meta.type,
715715
}

yarn.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8510,9 +8510,9 @@ __metadata:
85108510
languageName: node
85118511
linkType: hard
85128512

8513-
"@wireapp/api-client@npm:^27.79.1":
8514-
version: 27.79.1
8515-
resolution: "@wireapp/api-client@npm:27.79.1"
8513+
"@wireapp/api-client@npm:^27.80.1":
8514+
version: 27.80.1
8515+
resolution: "@wireapp/api-client@npm:27.80.1"
85168516
dependencies:
85178517
"@aws-sdk/client-s3": "npm:3.908.0"
85188518
"@aws-sdk/lib-storage": "npm:3.908.0"
@@ -8531,7 +8531,7 @@ __metadata:
85318531
uuid: "npm:11.1.0"
85328532
ws: "npm:8.18.1"
85338533
zod: "npm:3.24.2"
8534-
checksum: 10/3dc09f0c036d270f5ae5dc4fcb1026930cb88f9e329bafa2150a5e29c8b543c5d16448580e6811697a2e420c34da03bcd7fe9654274c66a1c31b718286292180
8534+
checksum: 10/26257b3c0891c588007f205033c4d741d71b4173c752465df27cc3c7e90c1dcccd9ef2c23198ab1f4355e0618d0a7dc30f04e0039c87f231d0bd86ce8b75cd5b
85358535
languageName: node
85368536
linkType: hard
85378537

@@ -8596,11 +8596,11 @@ __metadata:
85968596
languageName: node
85978597
linkType: hard
85988598

8599-
"@wireapp/core@npm:46.39.7":
8600-
version: 46.39.7
8601-
resolution: "@wireapp/core@npm:46.39.7"
8599+
"@wireapp/core@npm:46.39.10":
8600+
version: 46.39.10
8601+
resolution: "@wireapp/core@npm:46.39.10"
86028602
dependencies:
8603-
"@wireapp/api-client": "npm:^27.79.1"
8603+
"@wireapp/api-client": "npm:^27.80.1"
86048604
"@wireapp/commons": "npm:^5.4.5"
86058605
"@wireapp/core-crypto": "npm:9.1.0"
86068606
"@wireapp/cryptobox": "npm:12.8.0"
@@ -8618,7 +8618,7 @@ __metadata:
86188618
long: "npm:^5.2.0"
86198619
uuid: "npm:9.0.1"
86208620
zod: "npm:3.24.2"
8621-
checksum: 10/1a3219376790a2123e4ae25b1c16dd0c056c7fa0eb77dbb67630c5286b527a6b7a307b6799382106fde8b4c697a3c35b5d4e67259f12f95097e8c18316bf4ad8
8621+
checksum: 10/d310f147cf0cfe28adadd36747189a4dc1755de6bb1c7342fd4af1878960c427686d2ca20f01c2eedb14d9d7da929559fe25e8d06e1be7bf9ce36d61704aa693
86228622
languageName: node
86238623
linkType: hard
86248624

@@ -22506,7 +22506,7 @@ __metadata:
2250622506
"@wireapp/avs-debugger": "npm:0.0.7"
2250722507
"@wireapp/commons": "npm:5.4.5"
2250822508
"@wireapp/copy-config": "npm:2.3.4"
22509-
"@wireapp/core": "npm:46.39.7"
22509+
"@wireapp/core": "npm:46.39.10"
2251022510
"@wireapp/eslint-config": "npm:3.0.7"
2251122511
"@wireapp/kalium-backup": "npm:0.0.4"
2251222512
"@wireapp/prettier-config": "npm:0.6.5"

0 commit comments

Comments
 (0)