Closed willin closed 2 years ago
Are the friends
all your friends on WeChat? Create a room requires the contacts is a bi-direction friend.
If the contacts meet the requirement, then I'd like to suggest that you can try other puppet like wxwork or paimon, and to see if other puppets work for you.
yes
const friends: Contact[] = [];
const result = await Promise.allSettled(
registeredUsers.map(async (user) => {
const contact = await this.Friendship.search({ phone: user.phone! });
if (contact?.friend()) {
friends.push(contact);
}
return contact;
})
);
I'm not sure whether the Friendship.search({ phone })
will work as your expected.
Have you tried to find two specific contacts by id Contact.find({ id })
so that we can make sure you get the correct contacts before creating the room?
Friendship.search failed normally...
================================================================================
VError: [tid:e05dff73] request has been cancelled for reason: SERVER_ERROR: 2 UNKNOWN: [tid:e05dff73] wechat bad request error
at Request._failAllPendingRequest (/Users/v0/Projects/Authing/wechaty-authing-poc/node_modules/padlocal-client-ts/src/Request.ts:334:15)
at ClientDuplexStreamImpl.<anonymous> (/Users/v0/Projects/Authing/wechaty-authing-poc/node_modules/padlocal-client-ts/src/Request.ts:82:12)
at ClientDuplexStreamImpl.emit (node:events:390:28)
at ClientDuplexStreamImpl.emit (node:domain:475:12)
at Object.onReceiveStatus (/Users/v0/Projects/Authing/wechaty-authing-poc/node_modules/@grpc/grpc-js/src/client.ts:673:18)
at Object.onReceiveStatus (/Users/v0/Projects/Authing/wechaty-authing-poc/node_modules/@grpc/grpc-js/src/client-interceptors.ts:424:48)
at /Users/v0/Projects/Authing/wechaty-authing-poc/node_modules/@grpc/grpc-js/src/call-stream.ts:323:24
at processTicksAndRejections (node:internal/process/task_queues:78:11)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
07:14:57 VERB PuppetServiceImpl roomCreate()
07:14:57 ERR PuppetServiceImpl grpcError() roomCreate() rejection: roomId is required
我也遇到类似的情况了,gateway 版本0.78
source:
error: