-
-
Notifications
You must be signed in to change notification settings - Fork 678
Conversation
Signed-off-by: Till Faelligen <[email protected]>
…fix-fed-powerlevels
rsAPI api.RoomserverInternalAPI, | ||
event *gomatrixserverlib.Event, | ||
) (ok bool, response *util.JSONResponse) { | ||
req := api.QueryLatestEventsAndStateRequest{RoomID: roomID} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably be setting StateToFetch
in req
so that we aren't pulling out lots of state events that we don't need - ultimately we only care about the create event and the existing power level event.
break | ||
} | ||
} | ||
if event.Sender() != creator && r.ServerName != event.Origin() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this check is doing the right thing - ultimately what we want to do is check if the event is sent by the same creator only if there isn't a power level event already in the room.
If there is an existing power level event then we don't need to do this, as the soft-fail check will capture it if the current state events don't allow the new event.
} | ||
} | ||
|
||
if creator != "" && event.Sender() != creator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if we need a check in the client API for this? The roomserver should reject an event that it isn't happy with, and the client API won't be involved in remote servers pushing state to us.
This PR has been marked as stale and will be closed in 1 week if there are no further commits. |
Closed, for being stale and waiting for #1441. |
This was fixed in #1920 |
This solves #1327 (notifications test is already passing)
I'm a bit unhappy with getting the power levels, is there a better way?
Pull Request Checklist
sytest-whitelist
as specified in docs/sytest.md