feat: Added fetch profile endpoint in chat controller and link preview option in send text message

This commit is contained in:
Davidson Gomes
2023-07-23 22:24:21 -03:00
parent 9f52f20660
commit 798eb90bed
7 changed files with 176 additions and 35 deletions

View File

@@ -48,6 +48,14 @@ export class ChatController {
return await this.waMonitor.waInstances[instanceName].profilePicture(data.number);
}
public async fetchProfile({ instanceName }: InstanceDto, data: NumberDto) {
logger.verbose('requested fetchProfile from ' + instanceName + ' instance');
return await this.waMonitor.waInstances[instanceName].fetchProfile(
instanceName,
data.number,
);
}
public async fetchContacts({ instanceName }: InstanceDto, query: ContactQuery) {
logger.verbose('requested fetchContacts from ' + instanceName + ' instance');
return await this.waMonitor.waInstances[instanceName].fetchContacts(query);