these codes is not needed as matchFilters already handles it.

Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
Yonle 2024-02-18 11:54:02 +07:00
parent b8e93b395d
commit 4716b56272

View File

@ -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])) {