dao-governance-framework/forum-network/src/classes/action.js

18 lines
406 B
JavaScript
Raw Normal View History

2022-11-11 16:52:57 -06:00
export class Action {
constructor(name, scene) {
this.name = name;
this.scene = scene;
}
async log(src, dest, msg, obj, symbol = '->>') {
2022-11-11 16:52:57 -06:00
const logObj = false;
2023-01-26 11:36:39 -06:00
if (this.scene.sequence) {
await this.scene.sequence.log(
`${src.name} ${symbol} ${dest.name} : ${this.name} ${msg ?? ''} ${
logObj && obj ? JSON.stringify(obj) : ''
}`,
);
}
2022-11-11 16:52:57 -06:00
}
}