Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mergeMap(() => from(Symphony.sendMessage(streamId, message, null, Symphony.MESSAGEML_FORMAT))),
take(1))
static wrapDataFeed = () => new Observable(obs => {
try {
logger.info('Connecting to Symphony...')
Symphony.getDatafeedEventsService({
onMessage:
(messages: Symphony.Message[]) => {
obs.next(messages)
},
})
} catch (error) {
logger.error('connection to symphony failed', error)
obs.error(error)
}
})
constructor(private botConfig: BotConfig, private key: string, debug: boolean, private path: string = 'config/') {
Symphony.setDebugMode(debug)
logger.info(`Writing config file to ${path}.`)
SymphonyClient.writeConfigFiles(this.key, createConfig(this.botConfig, path), path)
logger.info(`Write complete ${path}`)
this.botConnnection$ = from(Symphony.initBot(`${this.path}/config.json`)).pipe(shareReplay(1))
}
constructor(private botConfig: BotConfig, private key: string, debug: boolean, private path: string = 'config/') {
Symphony.setDebugMode(debug)
logger.info(`Writing config file to ${path}.`)
SymphonyClient.writeConfigFiles(this.key, createConfig(this.botConfig, path), path)
logger.info(`Write complete ${path}`)
this.botConnnection$ = from(Symphony.initBot(`${this.path}/config.json`)).pipe(shareReplay(1))
}