{"action":"closed","issue":{"url":"https://api.github.com/repos/Chatie/wechaty/issues/1327","repository_url":"https://api.github.com/repos/Chatie/wechaty","labels_url":"https://api.github.com/repos/Chatie/wechaty/issues/1327/labels{/name}","comments_url":"https://api.github.com/repos/Chatie/wechaty/issues/1327/comments","events_url":"https://api.github.com/repos/Chatie/wechaty/issues/1327/events","html_url":"https://github.com/Chatie/wechaty/issues/1327","id":331985174,"node_id":"MDU6SXNzdWUzMzE5ODUxNzQ=","number":1327,"title":"[room create] cannot create successfully","user":{"login":"lijiarui","id":6419514,"node_id":"MDQ6VXNlcjY0MTk1MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/6419514?v=4","gravatar_id":"","url":"https://api.github.com/users/lijiarui","html_url":"https://github.com/lijiarui","followers_url":"https://api.github.com/users/lijiarui/followers","following_url":"https://api.github.com/users/lijiarui/following{/other_user}","gists_url":"https://api.github.com/users/lijiarui/gists{/gist_id}","starred_url":"https://api.github.com/users/lijiarui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lijiarui/subscriptions","organizations_url":"https://api.github.com/users/lijiarui/orgs","repos_url":"https://api.github.com/users/lijiarui/repos","events_url":"https://api.github.com/users/lijiarui/events{/privacy}","received_events_url":"https://api.github.com/users/lijiarui/received_events","type":"User","site_admin":false},"labels":[{"id":367767329,"node_id":"MDU6TGFiZWwzNjc3NjczMjk=","url":"https://api.github.com/repos/Chatie/wechaty/labels/bug","name":"bug","color":"ee0701","default":true},{"id":367767330,"node_id":"MDU6TGFiZWwzNjc3NjczMzA=","url":"https://api.github.com/repos/Chatie/wechaty/labels/duplicate","name":"duplicate","color":"cccccc","default":true}],"state":"closed","locked":false,"assignee":{"login":"zixia","id":1361891,"node_id":"MDQ6VXNlcjEzNjE4OTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1361891?v=4","gravatar_id":"","url":"https://api.github.com/users/zixia","html_url":"https://github.com/zixia","followers_url":"https://api.github.com/users/zixia/followers","following_url":"https://api.github.com/users/zixia/following{/other_user}","gists_url":"https://api.github.com/users/zixia/gists{/gist_id}","starred_url":"https://api.github.com/users/zixia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zixia/subscriptions","organizations_url":"https://api.github.com/users/zixia/orgs","repos_url":"https://api.github.com/users/zixia/repos","events_url":"https://api.github.com/users/zixia/events{/privacy}","received_events_url":"https://api.github.com/users/zixia/received_events","type":"User","site_admin":false},"assignees":[{"login":"zixia","id":1361891,"node_id":"MDQ6VXNlcjEzNjE4OTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1361891?v=4","gravatar_id":"","url":"https://api.github.com/users/zixia","html_url":"https://github.com/zixia","followers_url":"https://api.github.com/users/zixia/followers","following_url":"https://api.github.com/users/zixia/following{/other_user}","gists_url":"https://api.github.com/users/zixia/gists{/gist_id}","starred_url":"https://api.github.com/users/zixia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zixia/subscriptions","organizations_url":"https://api.github.com/users/zixia/orgs","repos_url":"https://api.github.com/users/zixia/repos","events_url":"https://api.github.com/users/zixia/events{/privacy}","received_events_url":"https://api.github.com/users/zixia/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-06-13T13:03:19Z","updated_at":"2018-06-14T13:57:06Z","closed_at":"2018-06-14T13:57:06Z","author_association":"MEMBER","body":"Wechaty version: 0.15.150\r\n\r\ntrying to create a room but failed:\r\n\r\ncode as follows:\r\n```ts\r\nasync function createDingRoom(contact: Contact): Promise<any> {\r\n  log.info('Bot', 'createDingRoom(%s)', contact)\r\n\r\n  try {\r\n    const helperContact = await getHelperContact()\r\n\r\n    if (!helperContact) {\r\n      log.warn('Bot', 'getHelperContact() found nobody')\r\n      contact.say(`You don't have a friend called ${HELPER_CONTACT_NAME}, because create a new room at least need 3 contacts, please set [HELPER_CONTACT_NAME] in the code first!`)\r\n      return\r\n    }\r\n\r\n    log.info('Bot', 'getHelperContact() ok. got: %s', helperContact.name())\r\n\r\n    const contactList = [contact, helperContact]\r\n    log.verbose('Bot', 'contactList: %s', contactList.join(','))\r\n\r\n    const room = await bot.Room.create(contactList, 'ding')\r\n    log.info('Bot', 'createDingRoom() new ding room created: %s', room)\r\n\r\n    await room.topic('ding - created')\r\n    await room.say('ding - created')\r\n\r\n    return room\r\n\r\n  } catch (e) {\r\n    log.error('Bot', 'getHelperContact() exception:', e.stack)\r\n    throw e\r\n  }\r\n}\r\n```\r\n\r\nI can get `await room.topic('ding - created')`  performed, but the log says:\r\n\r\n```shell\r\n20:57:36 WARN Room topic() room not ready\r\n20:57:36 ERR Bot getHelperContact() exception:\r\n20:57:36 ERR Error: not ready\r\n```\r\n\r\nfull log as follows:\r\n```shell\r\n20:57:35 SILL Puppet roomSearch() roomIdList filtered. result length=0\r\n20:57:35 INFO Bot onMessage: dingRoom not found, try to create one\r\n20:57:35 SILL Contact alias()\r\n20:57:35 INFO Bot createDingRoom(Contact<李佳芮>)\r\n20:57:35 INFO Bot getHelperContact()\r\n20:57:35 VERB Contact find({\"name\":\"李卓桓\"})\r\n20:57:35 VERB Cotnact findAll({ name: 李卓桓 })\r\n20:57:35 VERB Puppet contactSearch(query={\"name\":\"李卓桓\"}, )\r\n20:57:35 VERB PuppetPadchat contactList()\r\n20:57:35 VERB PuppetPadchatManager getContactIdList()\r\n20:57:35 SILL PuppetPadchatManager getContactIdList() = 258\r\n20:57:35 VERB Puppet contactQueryFilterFactory({\"name\":\"李卓桓\"})\r\n20:57:35 SILL Contact ready() @ PuppetPadchat<default>\r\n20:57:35 SILL Contact ready() isReady() true\r\n20:57:35 INFO Bot getHelperContact() ok. got: 李卓桓\r\n20:57:35 SILL Contact alias()\r\n20:57:35 SILL Contact alias()\r\n20:57:35 VERB Bot contactList: Contact<李佳芮>,Contact<李卓桓>\r\n20:57:35 SILL Contact alias()\r\n20:57:35 SILL Contact alias()\r\n20:57:35 VERB Room create(Contact<李佳芮>,Contact<李卓桓>, ding)\r\n20:57:35 VERB PuppetPadchat roomCreate(qq512436430,lizhuohuan, ding)\r\n20:57:35 SILL PadchatRpc rpcCall(WXCreateChatRoom, [\"[\\\"qq512436430\\\",\\\"lizhuohuan\\\"]\"])\r\nroomCreate returl: Promise { <pending> }\r\n20:57:36 SILL PadchatRpc WXCreateChatRoom , stranger,result: {\"message\":\"\\n\\u0010Everything is OK\",\"status\":0,\"user_name\":\"\\n\\u001410814025241@chatroom\"}\r\n20:57:36 SILL Accessory #18<Room<>> constructor()\r\n20:57:36 SILL Room constructor([object Object])\r\n20:57:36 SILL Puppet roomPayloadCache([object Object]) cache MISS\r\n20:57:36 INFO Bot createDingRoom() new ding room created: Room<[object Object]>\r\n20:57:36 VERB Room topic(ding - created)\r\n20:57:36 SILL Puppet roomPayloadCache([object Object]) cache MISS\r\n20:57:36 WARN Room topic() room not ready\r\n20:57:36 ERR Bot getHelperContact() exception:\r\n20:57:36 ERR Error: not ready\r\n20:57:38 SILL PadchatRpc onSocketTencent() discard empty message msg_id payoad: {\"continue\":0,\"msg_type\":32768,\"status\":1,\"uin\":324216852}\r\n```"}}
{"actor":{"display_login":"zixia"}}