smartuniverse/ts/smartuniverse.classes.clientuniversemessage.ts
2019-04-24 23:27:57 +02:00

35 lines
845 B
TypeScript

import * as plugins from './smartuniverse.plugins';
import * as interfaces from './interfaces';
import { IUniverseMessage } from './interfaces';
export class ClientUniverseMessage implements interfaces.IUniverseMessage {
// ======
// STATIC
// ======
public static createMessageFromPayload(messageDescriptor: interfaces.IUniverseMessage) {}
// ========
// INSTANCE
// ========
// properties
public id: string;
public timestamp: number;
public smartTimestamp: plugins.smarttime.TimeStamp;
public messageText: string;
public passphrase: string;
public payload: any;
public payloadStringType;
public targetChannelName: string;
constructor(messageArg: IUniverseMessage, payloadArg) {
for (const key of Object.keys(messageArg)) {
this[key] = messageArg[key];
}
}
getAsJsonForPayload() {};
}