juzibot / wechaty-puppet

Puppet Provider Abstraction for Wechaty
https://wechaty.github.io/wechaty-puppet
Apache License 2.0
0 stars 2 forks source link

Feat support notify the bot has been deleted or the bot delete contact #11

Open su-chang opened 2 years ago

su-chang commented 2 years ago

Background

We need a new event for receive these notifications:

  1. the bot has been deleted by contact
  2. the bot delete contact by WeCom App in the phone

Due to we have friendship event already, I think it's better to reuse this event receive friendship delete event.

The only one thing we should do is that add a new type in FriendshipType: https://github.com/juzibot/wechaty-puppet/blob/5fb409bb05bf8d011fc2935982025e807286d907/src/schemas/friendship.ts#L1-L6

Named the new FriendshipType type as Delete.

 export enum FriendshipType { 
   Unknown = 0, 
   Confirm, 
   Receive, 
   Verify, 
   Delete, 
 } 

Discuss

These two notifications should use the same type Deleted? Or add different type for them, e.g. Remove and Delete.

su-chang commented 2 years ago

Vote for add two different FriendshipType: Remove and Delete

su-chang commented 2 years ago

Conclusion

windmemory commented 2 years ago

It would be better to clearly separate the two concept with the types, so either Removed and Delete or Deleted and Delete.