@open-mercato/channel-discord 0.8.1-develop.7296.1.2111d779db → 0.8.1-develop.7441.1.b42958b98c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/channel-discord",
|
|
3
|
-
"version": "0.8.1-develop.
|
|
3
|
+
"version": "0.8.1-develop.7441.1.b42958b98c",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -62,14 +62,14 @@
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@open-mercato/core": "0.8.1-develop.
|
|
66
|
-
"@open-mercato/queue": "0.8.1-develop.
|
|
67
|
-
"@open-mercato/ui": "0.8.1-develop.
|
|
65
|
+
"@open-mercato/core": "0.8.1-develop.7441.1.b42958b98c",
|
|
66
|
+
"@open-mercato/queue": "0.8.1-develop.7441.1.b42958b98c",
|
|
67
|
+
"@open-mercato/ui": "0.8.1-develop.7441.1.b42958b98c"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"@mikro-orm/postgresql": "^7.0.14",
|
|
71
|
-
"@open-mercato/ai-assistant": "0.8.1-develop.
|
|
72
|
-
"@open-mercato/shared": "0.8.1-develop.
|
|
71
|
+
"@open-mercato/ai-assistant": "0.8.1-develop.7441.1.b42958b98c",
|
|
72
|
+
"@open-mercato/shared": "0.8.1-develop.7441.1.b42958b98c",
|
|
73
73
|
"react": "^19.0.0",
|
|
74
74
|
"react-dom": "^19.0.0"
|
|
75
75
|
},
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@open-mercato/ai-assistant": "0.8.1-develop.
|
|
83
|
-
"@open-mercato/shared": "0.8.1-develop.
|
|
82
|
+
"@open-mercato/ai-assistant": "0.8.1-develop.7441.1.b42958b98c",
|
|
83
|
+
"@open-mercato/shared": "0.8.1-develop.7441.1.b42958b98c",
|
|
84
84
|
"@types/jest": "^30.0.0",
|
|
85
85
|
"@types/react": "^19.2.18",
|
|
86
86
|
"@types/react-dom": "^19.2.5",
|
|
@@ -140,6 +140,29 @@ describe('channel_discord.channel.update_ai_auto_reply', () => {
|
|
|
140
140
|
expect(where.$or).toEqual([{ organizationId: { $in: [ORG] } }, { organizationId: null }])
|
|
141
141
|
})
|
|
142
142
|
|
|
143
|
+
it('cannot load or mutate a channel when organization scope is explicitly empty', async () => {
|
|
144
|
+
const channel = channelRow({ ...gatewayState })
|
|
145
|
+
findOne.mockImplementationOnce(async (_em, _entity, where: Record<string, unknown>) => {
|
|
146
|
+
const organizationFilter = where.organizationId as { $in?: unknown } | undefined
|
|
147
|
+
return Array.isArray(organizationFilter?.$in) && organizationFilter.$in.length === 0
|
|
148
|
+
? null
|
|
149
|
+
: channel
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
const result = await updateAiAutoReplyCommand.execute(
|
|
153
|
+
{
|
|
154
|
+
...baseInput({ aiAutoReplyEnabled: false }),
|
|
155
|
+
scope: { tenantId: TENANT, organizationId: ORG, organizationIds: [] },
|
|
156
|
+
} as never,
|
|
157
|
+
makeCtx(),
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
const [, , where] = findOne.mock.calls[0]
|
|
161
|
+
expect(where.organizationId).toEqual({ $in: [] })
|
|
162
|
+
expect(result).toEqual({ status: 'not_found' })
|
|
163
|
+
expect(channel.channelState).toEqual(gatewayState)
|
|
164
|
+
})
|
|
165
|
+
|
|
143
166
|
it('masks a channel it cannot see rather than reporting why', async () => {
|
|
144
167
|
findOne.mockResolvedValueOnce(null)
|
|
145
168
|
|