New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问有办法取得个人和群的唯一标识吗?或者有没有办法自己构建? #133

Closed
jerryge opened this Issue Dec 12, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@jerryge

jerryge commented Dec 12, 2016

如题,应用场景比如需要保存聊天记录。

@huan huan added the question label Dec 12, 2016

@huan

This comment has been minimized.

Member

huan commented Dec 12, 2016

You can get the unique ID for a contact/room by contact.id and room.id. However, this id will not keep consistent across Web Sessions.

If you want to identify the same contact across web sessions, you need to set a remark for the contact, like: contact.remark('1'), then you can expect to get 1 for the same contact by call contact.remark().

For a room, I still have no idea of how to identify it right now, because web wechat has no "remark for the room" feature yet. If anyone has any good idea or suggestion, please let me know, will appreciate it.

One more thing, there's looks have a way to get the Uin for a contact & a room from this issue: #90 . But we still did not have time to figure out how it works. If you could help us to figure it out, we can add this feature to Wechaty.

@jerryge

This comment has been minimized.

jerryge commented Dec 12, 2016

It is great! Thank you very much!

@jerryge jerryge closed this Dec 12, 2016

@huan

This comment has been minimized.

Member

huan commented Jun 21, 2018

Wechaty v0.15 Can Get the Unique ID of Contact/Room across sessions by PuppetPadchat

Start from Wechaty v0.15, we enable new Puppet System with all protocols support, include but not limited to Android, iOS, Pad, Win32, Web.

Learn more at:

Merge to #1307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment