Limited post send size and post syncing is working for small posts 😮

This commit is contained in:
2025-05-19 02:09:50 -07:00
parent d86519cf6b
commit 9df18d7f35
4 changed files with 40 additions and 4 deletions

View File

@@ -707,6 +707,11 @@ class PeerConnection {
this.messageSuperlog && console.log.apply(null, log(`[${logID(this.remotePeerID)}]<-datachannel[${logID(this.peerManager.peerID)}]:`, message.type, message, `message size:${messageJSON.length}`));
if (messageJSON.length > (32 * 1024)) {
this.messageSuperlog && console.log.apply(null, log(`[datachannel] Not sending long message: `, messageJSON.length));
return;
}
this.dataChannel?.send(messageJSON);
// this.onMessage(messageJSON);