using set instead of array for search (#7126)
* Resolve #6905 * Resolve #6905 * Resolve #6905
This commit is contained in:
parent
100a131913
commit
ff67fb337e
7 changed files with 18 additions and 18 deletions
|
|
@ -16,7 +16,7 @@ export default class extends Channel {
|
|||
|
||||
switch (type) {
|
||||
case 'notification': {
|
||||
if (this.muting.includes(body.userId)) return;
|
||||
if (this.muting.has(body.userId)) return;
|
||||
if (body.note && body.note.isHidden) {
|
||||
body.note = await Notes.pack(body.note.id, this.user, {
|
||||
detail: true
|
||||
|
|
@ -25,7 +25,7 @@ export default class extends Channel {
|
|||
break;
|
||||
}
|
||||
case 'mention': {
|
||||
if (this.muting.includes(body.userId)) return;
|
||||
if (this.muting.has(body.userId)) return;
|
||||
if (body.isHidden) {
|
||||
body = await Notes.pack(body.id, this.user, {
|
||||
detail: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue