-
Notifications
You must be signed in to change notification settings - Fork 56
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
Can Set State #800
base: dev
Are you sure you want to change the base?
Can Set State #800
Conversation
Looks like we are chasing the same animal :) see #799. I actually made a bit more involved |
Actually, the test failures here seem to be for the same reason I had with my implementation - those false negatives. |
I think I see the issue in the test. With no real server a power level event won't be set and of course We should be able to resolve the issue by doing all the can stuff in the room with |
…efore setting state to avoid pinging the server with no chance of success.
5aad63d
to
67354eb
Compare
So further investigation once I got the tests working locally (I realise now there is a server) but for whatever reason we're falling through to the final return 0 in |
Ah, I was looking at the wrong failure :( that one indeed is about the test being dirty: basically, it doesn't wait for the room to load completely, and |
This is the list we should take relevant items from if we want to implement authorization rules (=rules to allow or disallow sending certain events or perform certain actions) properly: https://spec.matrix.org/v1.11/rooms/v11/#authorization-rules |
So I agree having had a look I probably need to go back to the drawing board on this one. It looks like for a complete picture we need to be able to see the event that they want to send which in some ways goes against what i was trying to achieve. I.e. giving an indication before someone even tries to create an event, especially for thing like UI and greying out buttons. I'm going to have a deeper think about this. Maybe we can create something which has 3 output states yes|no|don't know because for some events we can totally give the indication while some we can't. |
Upstream canSetState and canSendEvent from NeoChat and use to check before setting state to avoid pinging the server with no chance of success.