mirror of
https://github.com/Yonle/bostr.git
synced 2025-03-18 05:42:03 +01:00
these codes is not needed as matchFilters already handles it.
Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
parent
b8e93b395d
commit
4716b56272
@ -225,13 +225,12 @@ function newConn(addr, client, reconn_t = 0) {
|
||||
data[1] = client.subalias.get(data[1]);
|
||||
if (client.pause_subs.has(data[1])) return;
|
||||
|
||||
if (client.acceptKinds && !client.acceptKinds.includes(data[2]?.kind)) return;
|
||||
if (client.rejectKinds && client.rejectKinds.includes(data[2]?.kind)) return;
|
||||
|
||||
const filters = client.subs.get(data[1]);
|
||||
if (!matchFilters(filters, data[2])) return;
|
||||
|
||||
const filter = client.mergedFilters.get(data[1]);
|
||||
const NotInSearchQuery = "search" in filter && !data[2]?.content?.toLowerCase().includes(filter.search.toLowerCase());
|
||||
if (!matchFilters(filters, data[2]) || NotInSearchQuery) return;
|
||||
if (NotInSearchQuery) return;
|
||||
if (client.events.get(data[1]).has(data[2]?.id)) return; // No need to transmit once it has been transmitted before.
|
||||
|
||||
if (!client.pause_subs.has(data[1])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user