Skip to content

Commit 01e0b84

Browse files
refactor: use handleInteractionOutput method for observe property and event also
1 parent 7079208 commit 01e0b84

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/core/src/consumed-thing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ export default class ConsumedThing extends TD.Thing implements IConsumedThing {
748748
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- tsc get confused when nullables are to listeners lambdas
749749
if (!content.type) content.type = form!.contentType ?? "application/json";
750750
try {
751-
listener(new InteractionOutput(content, form, tp));
751+
listener(this.handleInteractionOutput(content, form, tp));
752752
} catch (e) {
753753
const error = e instanceof Error ? e : new Error(JSON.stringify(e));
754754
warn(`Error while processing observe property for ${tp.title}. ${error.message}`);
@@ -806,7 +806,7 @@ export default class ConsumedThing extends TD.Thing implements IConsumedThing {
806806
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- tsc get confused when nullables are to listeners lambdas
807807
if (!content.type) content.type = form!.contentType ?? "application/json";
808808
try {
809-
listener(new InteractionOutput(content, form, te.data));
809+
listener(this.handleInteractionOutput(content, form, te.data));
810810
} catch (e) {
811811
const error = e instanceof Error ? e : new Error(JSON.stringify(e));
812812
warn(`Error while processing event for ${te.title}. ${error.message}`);

0 commit comments

Comments
 (0)