mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-22 21:53:46 +00:00
Merge pull request #1449 from MathMan05/inviteFix
This commit is contained in:
2 files changed
+7
-1
No files matched your search
@@ -104,6 +104,12 @@ export class Invite extends BaseClassWithoutId {
|
||||
if (this.max_uses !== 0 && this.uses >= this.max_uses) return true;
|
||||
return false;
|
||||
}
|
||||
toPublicJSON() {
|
||||
return {
|
||||
...this,
|
||||
inviter: this.inviter.toPublicUser(),
|
||||
};
|
||||
}
|
||||
|
||||
static async joinGuild(user_id: string, code: string) {
|
||||
const invite = await Invite.findOneOrFail({ where: { code } });
|
||||
|
||||
Reference in new issue
Block a user