-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[FEAT] New System Level Events #2529
Comments
After discussion in Wechaty Community Meeting (brief here) TODO:
I'd like to explain a bit for System Notification. When developing puppet for Wecom, we found some actions (e.g. moment publishing) may request authorization from Wechat client. This may due to one mobile number may have mutiple Wecom account (in different orginzations), but can only have 1 Wechat account. In this way, we might need a way to notify the bot owner to check one's phone for authorization. |
Hi, @hcfw007! I'm Dosu, and I'm helping the Wechaty team manage their backlog. I wanted to let you know that we are marking this issue as stale. From what I understand, you suggested implementing new system level events to improve the current event system. The proposal includes adding events for important contact and room information changes, as well as a more generic system level event for unclassified events. After discussion in the Wechaty Community Meeting, it was decided to accept this proposal. The resolution includes adding the suggested events and exposing dirty events to the bot level. The suggestion to notify the bot owner to check their phone for authorization in certain cases will also be considered. Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the Wechaty repository. If it is, please let us know by commenting on this issue. Otherwise, feel free to close the issue yourself or it will be automatically closed in 7 days. Thank you for your contribution and we look forward to hearing from you! |
By system level events, I mean events like 'SCAN', 'LOGIN', 'FRIENDSHIP', etc.
In my opinion, current event system requires some updates.
We do have 'Dirty' events to invalid cache, that is working well. However you cannot listen to 'Dirty' event in bot level. So if want to know if and when some contact info has changed, there's nothing I can do. If it's a room, I can listen to 'Room-Topic' event, so there should also be a 'Contact-Name' event.
Giving more thoughts, there might be more notifications that cannot be classified into any current event. Especially for 'Wecom', because it's too closed to 'Wechat' there are lots of identification checks that you need to do with 'Wechat' on your phone.
So here's my proposal:
Step 1: Implement more events for important contact and room info changes, like, 'Room-Owner', 'Contact-Name', 'Contact-ALias', etc.
Step 2: Going further on this route, we could have an 'Update' event for any payload change on classes. It's like kinda like dirty. The listener, on my opinion, should be like this:
Step 3: I haven't think it through, but there should be a more generic system level event for those events that cannot be classified. These events usually will not kick you offline entirely, but will limit the ability of your account. e.g. You might not be able to post moments before you check your identity on your phone with 'Wechat'
The text was updated successfully, but these errors were encountered: