mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-19 05:21:56 -06:00
Merge pull request #96 from moskoweb/fetch-profile
Get Info JID Correct
This commit is contained in:
commit
cd0da914f4
@ -1904,15 +1904,15 @@ export class WAStartupService {
|
||||
this.logger.verbose('Getting profile with jid: ' + jid);
|
||||
try {
|
||||
this.logger.verbose('Getting profile info');
|
||||
const business = await this.fetchBusinessProfile(jid);
|
||||
|
||||
if (number) {
|
||||
const info = (await this.whatsappNumber({ numbers: [jid] }))?.shift();
|
||||
const picture = await this.profilePicture(jid);
|
||||
const status = await this.getStatus(jid);
|
||||
const picture = await this.profilePicture(info?.jid);
|
||||
const status = await this.getStatus(info?.jid);
|
||||
const business = await this.fetchBusinessProfile(info?.jid);
|
||||
|
||||
return {
|
||||
wuid: jid,
|
||||
wuid: info?.jid || jid,
|
||||
name: info?.name,
|
||||
numberExists: info?.exists,
|
||||
picture: picture?.profilePictureUrl,
|
||||
@ -1924,6 +1924,7 @@ export class WAStartupService {
|
||||
};
|
||||
} else {
|
||||
const info = await waMonitor.instanceInfo(instanceName);
|
||||
const business = await this.fetchBusinessProfile(jid);
|
||||
|
||||
return {
|
||||
wuid: jid,
|
||||
|
Loading…
Reference in New Issue
Block a user