Submitted by @matthew:matrix.org
(Imported from https://matrix.org/jira/browse/SPEC-322)
Jira watchers: @illicitonion @ara4n
Could you describe the flow you expect users to take?
-- @illicitonion
In a matrix client I expect to be able to click on a 3PID invite and hit a cancel button. We could conceivably notify the 3PID target that the invite has been retracted, but in practice it's probably not worth it and we can just give them a "sorry, this invite is no longer valid" when they try to accept it.
-- @ara4n
Who should be allowed to do this? Right now, this doesn't exist for regular invites.
The original inviter? Anyone with "kick" power level? A new power level?
After some discussion with Erik and Mjark, there's no way to establish a happens-before relationship between the invite being cancelled and an attempted join event, so we're not going to be able to be resilient to people forking the graph and joining despite the cancellation. We can do this check in a federation-join by having the danced-with server check its current state, but that may be wrong.
Either way, I think this requires enough thought that Erik will probably end up being the one to do it :)
-- @illicitonion
It does already exist for regular invites. If you kick the invitee from the room, they are no longer invited.
Anyone with "kick" power level should be able to retract invites.
But bleurgh and fair enough regarding the causality mess. Sounds like Erik gets this prize then - although I'd hope we can directly take inspiration from non-3PID invites...
-- @ara4n
I manage a few rooms and the list of invalid invites is getting longer and longer. What about simply expiring 3PID invites after a week or so?
Element Web implements this by setting the content of the m.room.third_party_invite to {}. Shall we just spec this?
sgtm
That still doesn't retract the invite, it just makes it useless. Would be nice to clean it up properly.
Most helpful comment
I manage a few rooms and the list of invalid invites is getting longer and longer. What about simply expiring 3PID invites after a week or so?