Files
Unify/framework/client/processManager/processManager.promise.js

44 lines
947 B
JavaScript
Raw Normal View History

2025-12-25 11:16:59 +01:00
/*
Copyright (c) 2020, 2023, The Unified Company.
This code is part of Unify.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE,
as published by the Free Software Foundation.
See the GNU AFFERO GENERAL PUBLIC LICENSE, for more details.
https://unifyjs.org
*/
import tools from '../../unify/tools.js';
export default class processManagerPromise{
process( message ) {
var promise = this.promiseManager.getPromiseByID( message.id );
this.promiseManager.addMessage( message );
promise.resolve();
var object = message.data;
if( object && typeof object == "object" && !Array.isArray( object ) ) {
var className = tools.getClassNameByObject( object );
if( promise.object.debug | document.debugALL ) {
console.log( "%c recieved message: ", "background: #8bc34a;", this.port, message, className );
}
}
}
}