-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[RFC] Shall we clean up room information when we receive room events? #1552
Comments
After I think about it again, I agree with you and your PR before makes sense for us. Could you please resubmit this PR again, and replace all Thanks. |
@windmemory Finally I decide to make It seems we have to keep it because of the reasons we had discussed. Thank you for your thoughts about this. BTW: and also I had decided to make Please also restore your puppet PR and I'll merge it. After that, you will get all your modifications ready for use. |
Thanks for the discussion, they are valuable. You are the best :) |
It seems like when we receive room events, we don't clean up the cached room information, thus the room information will get staled.
Here is the code when we receive a room topic events:
It does call the
room.ready()
function to get the latest data for the room, but in/user/room.ts
, the code to do the ready is below:So, without passing
dirty
parameter into theready
function, it won't refresh the data. That is to say, when some room events happened, the room won't get refreshed.In
wechaty-puppet
layer, there is cache for the roomPayload, and the cache won't be refreshed inwechaty-puppet
layer itself, it only get triggered inwechaty
layer. Event the underline layer likewechaty-puppet-padchat
updated the data for the room, it can not be popped up.Will submit a PR later as a proposal.
The text was updated successfully, but these errors were encountered: