|
|
|
@ -2916,11 +2916,11 @@ class ChatPage extends LitElement {
|
|
|
|
|
|
|
|
|
|
if (window.parent.location.protocol === "https:") { |
|
|
|
|
|
|
|
|
|
directSocketLink = `wss://${nodeUrl}/websockets/chat/messages?involving=${window.parent.reduxStore.getState().app.selectedAddress.address}&involving=${cid}&encoding=BASE64`; |
|
|
|
|
directSocketLink = `wss://${nodeUrl}/websockets/chat/messages?involving=${window.parent.reduxStore.getState().app.selectedAddress.address}&involving=${cid}&encoding=BASE64&limit=1`; |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
// Fallback to http
|
|
|
|
|
directSocketLink = `ws://${nodeUrl}/websockets/chat/messages?involving=${window.parent.reduxStore.getState().app.selectedAddress.address}&involving=${cid}&encoding=BASE64`; |
|
|
|
|
directSocketLink = `ws://${nodeUrl}/websockets/chat/messages?involving=${window.parent.reduxStore.getState().app.selectedAddress.address}&involving=${cid}&encoding=BASE64&limit=1`; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.webSocket = new WebSocket(directSocketLink); |
|
|
|
@ -3011,11 +3011,11 @@ class ChatPage extends LitElement {
|
|
|
|
|
|
|
|
|
|
if (window.parent.location.protocol === "https:") { |
|
|
|
|
|
|
|
|
|
groupSocketLink = `wss://${nodeUrl}/websockets/chat/messages?txGroupId=${groupId}&encoding=BASE64`; |
|
|
|
|
groupSocketLink = `wss://${nodeUrl}/websockets/chat/messages?txGroupId=${groupId}&encoding=BASE64&limit=1`; |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
// Fallback to http
|
|
|
|
|
groupSocketLink = `ws://${nodeUrl}/websockets/chat/messages?txGroupId=${groupId}&encoding=BASE64`; |
|
|
|
|
groupSocketLink = `ws://${nodeUrl}/websockets/chat/messages?txGroupId=${groupId}&encoding=BASE64&limit=1`; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.webSocket = new WebSocket(groupSocketLink); |
|
|
|
|