Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Commit

Permalink
Revert "add blocklist"
Browse files Browse the repository at this point in the history
This reverts commit 7d4b7f2.

According to [https://github.com/adiwajshing/Baileys/issues/2182](this commit), the `blocklist` event won't be fired, so i'm just gonna revert this
  • Loading branch information
ookamiiixd committed Jan 6, 2023
1 parent 0edf083 commit acfa9d6
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 69 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom: ['https://paypal.me/ookamiiixd', 'https://trakteer.id/ookamiiixd']
9 changes: 0 additions & 9 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,6 @@ model Message {
@@index([sessionId])
}

model Blocklist {
pkId Int @id @default(autoincrement())
sessionId String @db.VarChar(128)
id String @db.VarChar(128)
@@unique([sessionId, id], map: "unique_id_per_session_id")
@@index([sessionId])
}

model Session {
pkId Int @id @default(autoincrement())
sessionId String @db.VarChar(128)
Expand Down
55 changes: 0 additions & 55 deletions src/handlers/blocklist.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/handlers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ export { default as chatHandler } from './chat';
export { default as messageHandler } from './message';
export { default as contactHandler } from './contact';
export { default as groupMetadataHandler } from './group-metadata';
export { default as blocklistHandler } from './blocklist';
4 changes: 0 additions & 4 deletions src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ export class Store {
private readonly messageHandler;
private readonly contactHandler;
private readonly groupMetadataHandler;
private readonly blocklistHandler;

constructor(sessionId: string, event: BaileysEventEmitter) {
this.chatHandler = handlers.chatHandler(sessionId, event);
this.messageHandler = handlers.messageHandler(sessionId, event);
this.contactHandler = handlers.contactHandler(sessionId, event);
this.groupMetadataHandler = handlers.groupMetadataHandler(sessionId, event);
this.blocklistHandler = handlers.blocklistHandler(sessionId, event);
this.listen();
}

Expand All @@ -38,7 +36,6 @@ export class Store {
this.messageHandler.listen();
this.contactHandler.listen();
this.groupMetadataHandler.listen();
this.blocklistHandler.listen();
}

/** Stop listening to the events */
Expand All @@ -47,6 +44,5 @@ export class Store {
this.messageHandler.unlisten();
this.contactHandler.unlisten();
this.groupMetadataHandler.unlisten();
this.blocklistHandler.unlisten();
}
}

0 comments on commit acfa9d6

Please sign in to comment.