Former room owners leaving room, inviting others #69
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
NB-Public/rocketchat2matrix#69
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If a room owner left the room at some point and someone needs to be invited, the script crashes with a
Response: 403 {"errcode":"M_FORBIDDEN","error":"@[former room owner] not in room ![room]."}Probably the admin should invite as a fallback.
The admin could also throw the error/not be in the room
The situation that caused the bug is a bit more complicated:
So the script made the creator invite the reactor during the room creation. Both left, which is implemented by the script. Then the message with a reaction from the reactor is parsed, but the script tries to invite them as the creator, causing a 403.
No other member has invitations rights, but I implemented a loop for every member to invite them. Finally, this is not necessary in this situation as the original invitation is still valid, so the reactor can join for themself.
I wonder how it behaves if the reactor has not been invited before and if the room is closed, but for now I will just warn about the failed invitation and continue to join.