mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-20 04:12:23 -06:00
feat: add support for fetching multiple instances by key
This commit adds a new feature to fetch instances by key in the InstanceController. If the provided key does not match the environment key, the controller will search for instances with the matching token. If instances are found, the names are extracted and passed to the waMonitor to retrieve instance information. Also, update the waMonitor's instanceInfo method to accept an array of instance names instead of a single name. Fixes #990
This commit is contained in:
@@ -1699,7 +1699,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
website: business?.website?.shift(),
|
||||
};
|
||||
} else {
|
||||
const info: Instance = await waMonitor.instanceInfo(instanceName);
|
||||
const info: Instance = await waMonitor.instanceInfo([instanceName]);
|
||||
const business = await this.fetchBusinessProfile(jid);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user