Fixed bot crash on file attachment, added 2 more new events and topic ID to file message #6

Merged
snxraven merged 18 commits from MiTask/LinkUp-P2P-Chat:main into main 2024-06-10 16:09:25 -04:00
Showing only changes of commit 92ba56b9fc - Show all commits

3
app.js
View File

@ -307,7 +307,7 @@ function sendMessage(e) {
message,
avatar: config.userAvatar,
topic: b4a.toString(currentRoom.topic, 'hex'),
peers: peersPublicKeys,
peers: peersPublicKeys, // Deprecated. To be deleted in future updates
timestamp: Date.now(),
readableTimestamp: new Date().toLocaleString(), // Added human-readable timestamp
});
@ -327,6 +327,7 @@ function sendFileMessage(name, fileUrl, fileType, avatar) {
fileUrl,
fileType,
avatar,
topic: b4a.toString(currentRoom.topic, 'hex'),
timestamp: Date.now(),
});