return bypassSilence to the frontend and remove isSilencedForMe
This commit is contained in:
parent
e425d841b1
commit
7728e749f1
4 changed files with 5 additions and 11 deletions
|
|
@ -573,7 +573,7 @@ export class UserEntityService implements OnModuleInit {
|
|||
rejectQuotes: user.rejectQuotes,
|
||||
attributionDomains: user.attributionDomains,
|
||||
isSilenced: user.isSilenced,
|
||||
isSilencedForMe: !bypassSilence && user.isSilenced,
|
||||
bypassSilence: bypassSilence,
|
||||
speakAsCat: user.speakAsCat ?? false,
|
||||
approved: user.approved,
|
||||
requireSigninToViewContents: user.requireSigninToViewContents === false ? undefined : true,
|
||||
|
|
@ -587,7 +587,6 @@ export class UserEntityService implements OnModuleInit {
|
|||
faviconUrl: instance.faviconUrl,
|
||||
themeColor: instance.themeColor,
|
||||
isSilenced: instance.isSilenced,
|
||||
isSilencedForMe: !bypassSilence && instance.isSilenced,
|
||||
mandatoryCW: instance.mandatoryCW,
|
||||
} : undefined) : undefined,
|
||||
followersCount: followersCount ?? 0,
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ export const packedUserLiteSchema = {
|
|||
type: 'boolean',
|
||||
nullable: false, optional: false,
|
||||
},
|
||||
isSilencedForMe: {
|
||||
bypassSilence: {
|
||||
type: 'boolean',
|
||||
nullable: false, optional: false,
|
||||
},
|
||||
|
|
@ -232,10 +232,6 @@ export const packedUserLiteSchema = {
|
|||
type: 'boolean',
|
||||
nullable: false, optional: false,
|
||||
},
|
||||
isSilencedForMe: {
|
||||
type: 'boolean',
|
||||
nullable: false, optional: false,
|
||||
},
|
||||
mandatoryCW: {
|
||||
type: 'string',
|
||||
nullable: true, optional: false,
|
||||
|
|
|
|||
|
|
@ -111,8 +111,8 @@ function getMutes(note: Misskey.entities.Note, withHardMute: boolean, overrides:
|
|||
const hardMuted = override.hardMuted ?? (!isMe && withHardMute && isHardMuted(note));
|
||||
const softMutedWords = override.softMutedWords ?? (isMe ? [] : isSoftMuted(note));
|
||||
const sensitiveMuted = override.sensitiveMuted ?? isSensitiveMuted(note);
|
||||
const userSilenced = override.userSilenced ?? note.user.isSilencedForMe;
|
||||
const instanceSilenced = override.instanceSilenced ?? note.user.instance?.isSilencedForMe ?? false;
|
||||
const userSilenced = override.userSilenced ?? (note.user.isSilenced && !note.user.bypassSilence);
|
||||
const instanceSilenced = override.instanceSilenced ?? (note.user.instance?.isSilenced && !note.user.bypassSilence) ?? false;
|
||||
const threadMuted = override.threadMuted ?? (!isMe && note.isMutingThread);
|
||||
const noteMuted = override.noteMuted ?? (!isMe && note.isMutingNote);
|
||||
const noteMandatoryCW = override.noteMandatoryCW !== undefined
|
||||
|
|
|
|||
|
|
@ -4307,7 +4307,7 @@ export type components = {
|
|||
isCat?: boolean;
|
||||
speakAsCat?: boolean;
|
||||
isSilenced: boolean;
|
||||
isSilencedForMe: boolean;
|
||||
bypassSilence: boolean;
|
||||
requireSigninToViewContents?: boolean;
|
||||
makeNotesFollowersOnlyBefore?: number | null;
|
||||
makeNotesHiddenBefore?: number | null;
|
||||
|
|
@ -4319,7 +4319,6 @@ export type components = {
|
|||
faviconUrl: string | null;
|
||||
themeColor: string | null;
|
||||
isSilenced: boolean;
|
||||
isSilencedForMe: boolean;
|
||||
mandatoryCW: string | null;
|
||||
};
|
||||
followersCount: number;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue