Implement email config
This commit is contained in:
@ -214,4 +214,12 @@ export type IMeta = {
|
||||
enableExternalUserRecommendation?: boolean;
|
||||
externalUserRecommendationEngine?: string;
|
||||
externalUserRecommendationTimeout?: number;
|
||||
|
||||
enableEmail?: boolean;
|
||||
email?: string;
|
||||
smtpSecure?: boolean;
|
||||
smtpHost?: string;
|
||||
smtpPort?: number;
|
||||
smtpUser?: string;
|
||||
smtpPass?: string;
|
||||
};
|
||||
|
@ -78,6 +78,8 @@ export interface ILocalUser extends IUserBase {
|
||||
host: null;
|
||||
keypair: string;
|
||||
email: string;
|
||||
emailVerified?: boolean;
|
||||
emailVerifyCode?: string;
|
||||
password: string;
|
||||
token: string;
|
||||
twitter: {
|
||||
@ -99,9 +101,6 @@ export interface ILocalUser extends IUserBase {
|
||||
username: string;
|
||||
discriminator: string;
|
||||
};
|
||||
line: {
|
||||
userId: string;
|
||||
};
|
||||
profile: {
|
||||
location: string;
|
||||
birthday: string; // 'YYYY-MM-DD'
|
||||
@ -286,6 +285,7 @@ export const pack = (
|
||||
delete _user._id;
|
||||
|
||||
delete _user.usernameLower;
|
||||
delete _user.emailVerifyCode;
|
||||
|
||||
if (_user.host == null) {
|
||||
// Remove private properties
|
||||
@ -306,11 +306,11 @@ export const pack = (
|
||||
delete _user.discord.refreshToken;
|
||||
delete _user.discord.expiresDate;
|
||||
}
|
||||
delete _user.line;
|
||||
|
||||
// Visible via only the official client
|
||||
if (!opts.includeSecrets) {
|
||||
delete _user.email;
|
||||
delete _user.emailVerified;
|
||||
delete _user.settings;
|
||||
delete _user.clientSettings;
|
||||
}
|
||||
|
Reference in New Issue
Block a user