forked from snxraven/LinkUp-P2P-Chat
Testing if sendMessage argument extends Message class
This commit is contained in:
parent
b3ccda32ea
commit
feff30fecc
@ -4,6 +4,7 @@ import b4a from "b4a";
|
|||||||
import TextMessage from "./TextMessage.js";
|
import TextMessage from "./TextMessage.js";
|
||||||
import FileMessage from "./FileMessage.js";
|
import FileMessage from "./FileMessage.js";
|
||||||
import AudioMessage from "./AudioMessage.js";
|
import AudioMessage from "./AudioMessage.js";
|
||||||
|
import Message from "./Message.js";
|
||||||
|
|
||||||
class Client extends EventEmitter {
|
class Client extends EventEmitter {
|
||||||
constructor(botName) {
|
constructor(botName) {
|
||||||
@ -86,7 +87,7 @@ class Client extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sendMessage(message) {
|
sendMessage(message) {
|
||||||
console.log(typeof message);
|
console.log(message.prototype instanceof Message);
|
||||||
|
|
||||||
console.log('Bot name:', this.botName);
|
console.log('Bot name:', this.botName);
|
||||||
const data = message.toJsonString();
|
const data = message.toJsonString();
|
||||||
|
Loading…
Reference in New Issue
Block a user