merge: enable WeChat media for all users
Memind CI / Test, build, and release guards (push) Successful in 2m18s
Memind CI / Test, build, and release guards (push) Successful in 2m18s
This commit is contained in:
@@ -1198,6 +1198,7 @@ function isWechatMediaGrayUser(user, configuredUsers = []) {
|
|||||||
? configuredUsers.map((value) => String(value ?? '').trim().toLowerCase()).filter(Boolean)
|
? configuredUsers.map((value) => String(value ?? '').trim().toLowerCase()).filter(Boolean)
|
||||||
: [];
|
: [];
|
||||||
if (allowlist.length === 0) return false;
|
if (allowlist.length === 0) return false;
|
||||||
|
if (allowlist.includes('*')) return true;
|
||||||
const identities = [
|
const identities = [
|
||||||
user?.userId,
|
user?.userId,
|
||||||
user?.username,
|
user?.username,
|
||||||
|
|||||||
+2
-2
@@ -3697,7 +3697,7 @@ test('wechat mp service falls back to ASR when voice recognition is empty', asyn
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
test('wechat mp service persists image and routes image url into agent prompt', async () => {
|
test('wechat mp wildcard media access persists image and routes image url into agent prompt', async () => {
|
||||||
const token = 'token';
|
const token = 'token';
|
||||||
const timestamp = '1710000000';
|
const timestamp = '1710000000';
|
||||||
const nonce = 'nonce';
|
const nonce = 'nonce';
|
||||||
@@ -3719,7 +3719,7 @@ test('wechat mp service persists image and routes image url into agent prompt',
|
|||||||
unboundTextPrefix: '请先绑定',
|
unboundTextPrefix: '请先绑定',
|
||||||
progressDelayMs: 0,
|
progressDelayMs: 0,
|
||||||
maxImageBytes: 1024 * 1024,
|
maxImageBytes: 1024 * 1024,
|
||||||
mediaAnalysisGrayUsers: [testUserId],
|
mediaAnalysisGrayUsers: ['*'],
|
||||||
},
|
},
|
||||||
userAuth: {
|
userAuth: {
|
||||||
async findWechatUserByOpenid() {
|
async findWechatUserByOpenid() {
|
||||||
|
|||||||
Reference in New Issue
Block a user