Reworked message format, added support for audio messages, made Message class #10

Merged
snxraven merged 20 commits from MiTask/LinkUp-P2P-Chat:main into main 2024-06-14 14:15:43 -04:00
Showing only changes of commit feff30fecc - Show all commits

View File

@ -4,6 +4,7 @@ import b4a from "b4a";
import TextMessage from "./TextMessage.js";
import FileMessage from "./FileMessage.js";
import AudioMessage from "./AudioMessage.js";
import Message from "./Message.js";
class Client extends EventEmitter {
constructor(botName) {
@ -86,7 +87,7 @@ class Client extends EventEmitter {
}
sendMessage(message) {
console.log(typeof message);
console.log(message.prototype instanceof Message);
console.log('Bot name:', this.botName);
const data = message.toJsonString();