also filter by acceptAction just in case
All checks were successful
Build / build (18) (push) Successful in 52s
Build / build (20) (push) Successful in 1m16s
Build / build (22) (push) Successful in 42s
Build / build (22) (pull_request) Successful in 43s
Build / build (20) (pull_request) Successful in 1m15s
Build / build (18) (pull_request) Successful in 1m30s
All checks were successful
Build / build (18) (push) Successful in 52s
Build / build (20) (push) Successful in 1m16s
Build / build (22) (push) Successful in 42s
Build / build (22) (pull_request) Successful in 43s
Build / build (20) (pull_request) Successful in 1m15s
Build / build (18) (pull_request) Successful in 1m30s
This commit is contained in:
parent
bfa992bf79
commit
18fcfb4edf
@ -38,7 +38,11 @@ export const removeFromGuildController: RequestHandler = async (req, res) => {
|
|||||||
// TODO: Handle clan leader kicking themselves (guild should be deleted in this case, I think)
|
// TODO: Handle clan leader kicking themselves (guild should be deleted in this case, I think)
|
||||||
} else if (guildMember.status == 2) {
|
} else if (guildMember.status == 2) {
|
||||||
// Delete the inbox message for the invite
|
// Delete the inbox message for the invite
|
||||||
await Inbox.deleteOne({ ownerId: guildMember.accountId, contextInfo: guild._id.toString() });
|
await Inbox.deleteOne({
|
||||||
|
ownerId: guildMember.accountId,
|
||||||
|
contextInfo: guild._id.toString(),
|
||||||
|
acceptAction: "GUILD_INVITE"
|
||||||
|
});
|
||||||
}
|
}
|
||||||
await GuildMember.deleteOne({ _id: guildMember._id });
|
await GuildMember.deleteOne({ _id: guildMember._id });
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user