mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-04 10:55:44 +00:00
add legacy_username user field
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -111,6 +111,7 @@ router.get(
|
||||
user_profile: userProfile,
|
||||
guild_member: guild_member?.toPublicMember(),
|
||||
guild_member_profile: guild_id && guildMemberProfile,
|
||||
legacy_username: user.legacy_username, // part of the uniqueUsernames feature, only used for migrated accounts
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
@@ -38,6 +38,7 @@ import { UserSettings } from "./UserSettings";
|
||||
export enum PublicUserEnum {
|
||||
username,
|
||||
global_name,
|
||||
legacy_username,
|
||||
discriminator,
|
||||
id,
|
||||
public_flags,
|
||||
@@ -92,7 +93,10 @@ export class User extends BaseClass {
|
||||
username: string; // username max length 32, min 2 (should be configurable)
|
||||
|
||||
@Column({ nullable: true })
|
||||
global_name?: string; // puyo: uniqueUsernames
|
||||
global_name?: string; // puyo: part of the uniqueUsernames feature, this is the users "nickname"
|
||||
|
||||
@Column({ nullable: true })
|
||||
legacy_username?: string; // puyo: part of the uniqueUsernames feature, shows the users old username (only used for migrated accounts)
|
||||
|
||||
@Column()
|
||||
discriminator: string; // opaque string: 4 digits on discord.com, 0 for uniqueUsernames
|
||||
|
||||
Reference in New Issue
Block a user