Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

refactor(contact): remove the unused checkNumberExists service method

Yudhi Armyndharis8c7eff68b126
diff --git a/src/modules/contact/contact.service.spec.ts b/src/modules/contact/contact.service.spec.ts
index 3152829c0..dacbfd27f 100644
--- a/src/modules/contact/contact.service.spec.ts
+++ b/src/modules/contact/contact.service.spec.ts
@@ -52,12 +52,6 @@ describe('ContactService', () => {
await expect(svc.getContactById('s1', 'c404')).rejects.toBeInstanceOf(NotFoundException);
});
- it('delegates checkNumberExists to the engine', async () => {
- const checkNumberExists = jest.fn().mockResolvedValue(true);
- await expect(makeService({ checkNumberExists }).checkNumberExists('s1', '628123')).resolves.toBe(true);
- expect(checkNumberExists).toHaveBeenCalledWith('628123');
- });
-
it('delegates getNumberId to the engine (canonical JID resolution)', async () => {
const getNumberId = jest.fn().mockResolvedValue('[email protected]');
await expect(makeService({ getNumberId }).getNumberId('s1', '628123')).resolves.toBe('[email protected]');
diff --git a/src/modules/contact/contact.service.ts b/src/modules/contact/contact.service.ts
index 4c2106d5c..3cde9b8cd 100644
--- a/src/modules/contact/contact.service.ts
+++ b/src/modules/contact/contact.service.ts
@@ -45,10 +45,6 @@ export class ContactService {
return this.getEngine(sessionId).getBlockedContacts();
}
- checkNumberExists(sessionId: string, number: string) {
- return this.getEngine(sessionId).checkNumberExists(number);
- }
-
getNumberId(sessionId: string, number: string) {
return this.getEngine(sessionId).getNumberId(number);
}