Compare commits
2 commits
87e1e658f2
...
96c3744555
Author | SHA1 | Date | |
---|---|---|---|
96c3744555 | |||
b023741f50 |
7 changed files with 2 additions and 22 deletions
|
@ -11,9 +11,11 @@ export class removeIntegrations1670359028055 {
|
||||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableDiscordIntegration"`);
|
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableDiscordIntegration"`);
|
||||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "discordClientId"`);
|
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "discordClientId"`);
|
||||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "discordClientSecret"`);
|
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "discordClientSecret"`);
|
||||||
|
await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "integrations"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async down(queryRunner) {
|
async down(queryRunner) {
|
||||||
|
await queryRunner.query(`ALTER TABLE "user_profile" ADD "integrations" jsonb NOT NULL DEFAULT '{}'`);
|
||||||
await queryRunner.query(`ALTER TABLE "meta" ADD "discordClientSecret" character varying(128)`);
|
await queryRunner.query(`ALTER TABLE "meta" ADD "discordClientSecret" character varying(128)`);
|
||||||
await queryRunner.query(`ALTER TABLE "meta" ADD "discordClientId" character varying(128)`);
|
await queryRunner.query(`ALTER TABLE "meta" ADD "discordClientId" character varying(128)`);
|
||||||
await queryRunner.query(`ALTER TABLE "meta" ADD "enableDiscordIntegration" boolean NOT NULL DEFAULT false`);
|
await queryRunner.query(`ALTER TABLE "meta" ADD "enableDiscordIntegration" boolean NOT NULL DEFAULT false`);
|
||||||
|
|
|
@ -167,11 +167,6 @@ export class UserProfile {
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public pinnedPage: Page | null;
|
public pinnedPage: Page | null;
|
||||||
|
|
||||||
@Column('jsonb', {
|
|
||||||
default: {},
|
|
||||||
})
|
|
||||||
public integrations: Record<string, any>;
|
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('boolean', {
|
@Column('boolean', {
|
||||||
default: false, select: false,
|
default: false, select: false,
|
||||||
|
|
|
@ -387,7 +387,6 @@ export const UserRepository = db.getRepository(User).extend({
|
||||||
hasUnreadMessagingMessage: this.getHasUnreadMessagingMessage(user.id),
|
hasUnreadMessagingMessage: this.getHasUnreadMessagingMessage(user.id),
|
||||||
hasUnreadNotification: this.getHasUnreadNotification(user.id),
|
hasUnreadNotification: this.getHasUnreadNotification(user.id),
|
||||||
hasPendingReceivedFollowRequest: this.getHasPendingReceivedFollowRequest(user.id),
|
hasPendingReceivedFollowRequest: this.getHasPendingReceivedFollowRequest(user.id),
|
||||||
integrations: profile!.integrations,
|
|
||||||
mutedWords: profile!.mutedWords,
|
mutedWords: profile!.mutedWords,
|
||||||
mutedInstances: profile!.mutedInstances,
|
mutedInstances: profile!.mutedInstances,
|
||||||
mutingNotificationTypes: profile!.mutingNotificationTypes,
|
mutingNotificationTypes: profile!.mutingNotificationTypes,
|
||||||
|
|
|
@ -352,10 +352,6 @@ export const packedMeDetailedOnlySchema = {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
nullable: false, optional: false,
|
nullable: false, optional: false,
|
||||||
},
|
},
|
||||||
integrations: {
|
|
||||||
type: 'object',
|
|
||||||
nullable: true, optional: false,
|
|
||||||
},
|
|
||||||
mutedWords: {
|
mutedWords: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
nullable: false, optional: false,
|
nullable: false, optional: false,
|
||||||
|
|
|
@ -45,11 +45,6 @@ export default define(meta, paramDef, async (ps, me) => {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const maskedKeys = ['accessToken', 'accessTokenSecret', 'refreshToken'];
|
|
||||||
Object.keys(profile.integrations).forEach(integration => {
|
|
||||||
maskedKeys.forEach(key => profile.integrations[integration][key] = '<MASKED>');
|
|
||||||
});
|
|
||||||
|
|
||||||
const signins = await Signins.findBy({ userId: user.id });
|
const signins = await Signins.findBy({ userId: user.id });
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -61,7 +56,6 @@ export default define(meta, paramDef, async (ps, me) => {
|
||||||
carefulBot: profile.carefulBot,
|
carefulBot: profile.carefulBot,
|
||||||
injectFeaturedNote: profile.injectFeaturedNote,
|
injectFeaturedNote: profile.injectFeaturedNote,
|
||||||
receiveAnnouncementEmail: profile.receiveAnnouncementEmail,
|
receiveAnnouncementEmail: profile.receiveAnnouncementEmail,
|
||||||
integrations: profile.integrations,
|
|
||||||
mutedWords: profile.mutedWords,
|
mutedWords: profile.mutedWords,
|
||||||
mutedInstances: profile.mutedInstances,
|
mutedInstances: profile.mutedInstances,
|
||||||
mutingNotificationTypes: profile.mutingNotificationTypes,
|
mutingNotificationTypes: profile.mutingNotificationTypes,
|
||||||
|
|
|
@ -89,11 +89,6 @@ const menuDef = computed(() => [{
|
||||||
text: i18n.ts.email,
|
text: i18n.ts.email,
|
||||||
to: '/settings/email',
|
to: '/settings/email',
|
||||||
active: props.initialPage === 'email',
|
active: props.initialPage === 'email',
|
||||||
}, {
|
|
||||||
icon: 'fas fa-share-alt',
|
|
||||||
text: i18n.ts.integration,
|
|
||||||
to: '/settings/integration',
|
|
||||||
active: props.initialPage === 'integration',
|
|
||||||
}, {
|
}, {
|
||||||
icon: 'fas fa-lock',
|
icon: 'fas fa-lock',
|
||||||
text: i18n.ts.security,
|
text: i18n.ts.security,
|
||||||
|
|
|
@ -98,7 +98,6 @@ export type MeDetailed = UserDetailed & {
|
||||||
hasUnreadSpecifiedNotes: boolean;
|
hasUnreadSpecifiedNotes: boolean;
|
||||||
hideOnlineStatus: boolean;
|
hideOnlineStatus: boolean;
|
||||||
injectFeaturedNote: boolean;
|
injectFeaturedNote: boolean;
|
||||||
integrations: Record<string, any>;
|
|
||||||
isDeleted: boolean;
|
isDeleted: boolean;
|
||||||
isExplorable: boolean;
|
isExplorable: boolean;
|
||||||
mutedWords: string[][];
|
mutedWords: string[][];
|
||||||
|
|
Loading…
Reference in a new issue