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
添加群成员为好友 #2142
Comments
Could you explain why did you not consider the following API in your request? wechaty.Friendship.add(contact, 'hello') |
agree, because roomid is required while adding contact from room. |
出于以下几点考虑:
|
Maybe there is another alternative: wechaty.Friendship.add(contact, 'hello', room); The third parameter is optional. |
Yes, it will be better for us to keep all Friendship related operations encapsulating in the I'd like to contribute a little more based on Yuan's version, by changing the second argument to an optional interface FriendshipAddOptionsObj {
room?: Room,
contact?: Contact,
hello?: string,
}
type FriendshipAddOptions = string | FriendshipAddOptionsObj
class Friendship {
add (contact: Contact, options?: FriendshipAddOptions)
} |
|
You can safely ignore it for now, because it's And I believe it's not hard to guess the scenario in which it is required. |
This feature has supported in |
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
支持添加群内联系人为好友,可以便于针对群内不同用户进行针对性沟通。
Describe the solution you'd like
A clear and concise description of what you want to happen.
在任意群聊内,指定群成员添加为好友,并可附带一段好友验证消息。
底层实现所需参数
接口设计
待讨论
The text was updated successfully, but these errors were encountered: