mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 03:17:38 -07:00
[mastodon-client] Fix renoteMuting for streaming API
This commit is contained in:
parent
10865168bf
commit
d025177d2c
4 changed files with 4 additions and 4 deletions
|
@ -74,7 +74,7 @@ export class MastodonStreamList extends MastodonStream {
|
|||
private async shouldProcessNote(note: Note | Packed<"Note">): Promise<boolean> {
|
||||
if (!this.listUsers.includes(note.userId)) return false;
|
||||
if (note.channelId) return false;
|
||||
if (note.renote && !note.text && this.renoteMuting.has(note.userId)) return false;
|
||||
if (note.renoteId !== null && !note.text && this.renoteMuting.has(note.userId)) return false;
|
||||
if (this.userProfile && (await getWordHardMute(note, this.user, this.userProfile.mutedWords))) return false;
|
||||
if (note.visibility === "specified") return !!note.visibleUserIds?.includes(this.user.id);
|
||||
if (note.visibility === "followers") return this.following.has(note.userId);
|
||||
|
|
|
@ -71,7 +71,7 @@ export class MastodonStreamPublic extends MastodonStream {
|
|||
if (isInstanceMuted(note, new Set<string>(this.userProfile?.mutedInstances ?? []))) return false;
|
||||
if (isUserRelated(note, this.muting)) return false;
|
||||
if (isUserRelated(note, this.blocking)) return false;
|
||||
if (note.renote && !isQuote(note) && this.renoteMuting.has(note.userId)) return false;
|
||||
if (note.renoteId !== null && !isQuote(note) && this.renoteMuting.has(note.userId)) return false;
|
||||
if (this.userProfile && (await getWordHardMute(note, this.user, this.userProfile.mutedWords))) return false;
|
||||
|
||||
return true;
|
||||
|
|
|
@ -63,7 +63,7 @@ export class MastodonStreamTag extends MastodonStream {
|
|||
if (isInstanceMuted(note, new Set<string>(this.userProfile?.mutedInstances ?? []))) return false;
|
||||
if (isUserRelated(note, this.muting)) return false;
|
||||
if (isUserRelated(note, this.blocking)) return false;
|
||||
if (note.renote && !isQuote(note) && this.renoteMuting.has(note.userId)) return false;
|
||||
if (note.renoteId !== null && !isQuote(note) && this.renoteMuting.has(note.userId)) return false;
|
||||
if (this.userProfile && (await getWordHardMute(note, this.user, this.userProfile.mutedWords))) return false;
|
||||
|
||||
return true;
|
||||
|
|
|
@ -98,7 +98,7 @@ export class MastodonStreamUser extends MastodonStream {
|
|||
if (isUserRelated(note, this.muting)) return false;
|
||||
if (isUserRelated(note, this.blocking)) return false;
|
||||
if (isUserRelated(note, this.hidden)) return false;
|
||||
if (note.renote && !isQuote(note) && this.renoteMuting.has(note.userId)) return false;
|
||||
if (note.renoteId !== null && !isQuote(note) && this.renoteMuting.has(note.userId)) return false;
|
||||
if (this.userProfile && (await getWordHardMute(note, this.user, this.userProfile.mutedWords))) return false;
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue