Skip to content

Commit

Permalink
Update matterbridge.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Luligu committed Apr 1, 2024
1 parent 92b1ada commit afacb25
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/matterbridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1046,10 +1046,11 @@ export class Matterbridge extends EventEmitter {
const data = await fs.readFile(configFile, 'utf8');
const config = JSON.parse(data) as PlatformConfig;
this.log.debug(`Config file found: ${configFile}.\nConfig:${rs}\n`, config);
if (config.name !== plugin.name || config.type !== plugin.type) {
this.log.error(`Config file ${configFile} does not match plugin ${plg}${plugin.name}${er} type ${typ}${plugin.type}${er}`);
return config;
}
//if (config.name !== plugin.name || config.type !== plugin.type) {
//this.log.warn(`Config file ${configFile} does not match plugin ${plg}${plugin.name}${wr} type ${typ}${plugin.type}${wr}`);
config.name = plugin.name;
config.type = plugin.type;
//}
return config;
} catch (err) {
if (err instanceof Error) {
Expand Down

0 comments on commit afacb25

Please sign in to comment.