fix(listeners-explorer): ignore empty callback return data

This commit is contained in:
Morb0 2021-01-06 22:35:01 +03:00
parent fcaa89d097
commit 6656c39bd9

View File

@ -141,7 +141,9 @@ export class ListenersExplorerService
...args, ...args,
async (ctx: Context, next: Function): Promise<void> => { async (ctx: Context, next: Function): Promise<void> => {
const result = await listenerCallbackFn(ctx, next); const result = await listenerCallbackFn(ctx, next);
await ctx.reply(String(result)); if (result) {
await ctx.reply(String(result));
}
// TODO-Possible-Feature: Add more supported return types // TODO-Possible-Feature: Add more supported return types
}, },
); );