Merge pull request #158 from Philreact/ugfix/reply-name-and-limit-websocket
bugfix/reply name and limit websocket
This commit is contained in:
commit
bd534c67bc
@ -2916,11 +2916,11 @@ class ChatPage extends LitElement {
|
|||||||
|
|
||||||
if (window.parent.location.protocol === "https:") {
|
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 {
|
} else {
|
||||||
|
|
||||||
// Fallback to http
|
// 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);
|
this.webSocket = new WebSocket(directSocketLink);
|
||||||
@ -3011,11 +3011,11 @@ class ChatPage extends LitElement {
|
|||||||
|
|
||||||
if (window.parent.location.protocol === "https:") {
|
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 {
|
} else {
|
||||||
|
|
||||||
// Fallback to http
|
// 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);
|
this.webSocket = new WebSocket(groupSocketLink);
|
||||||
|
@ -797,7 +797,7 @@ class MessageTemplate extends LitElement {
|
|||||||
class=${this.myAddress !== repliedToData.sender
|
class=${this.myAddress !== repliedToData.sender
|
||||||
? "original-message-sender"
|
? "original-message-sender"
|
||||||
: "message-data-my-name"}>
|
: "message-data-my-name"}>
|
||||||
${repliedToData.senderName ? cropAddress(repliedToData.sender) : ''}
|
${repliedToData.senderName ? repliedToData.senderName : cropAddress(repliedToData.sender) }
|
||||||
</p>
|
</p>
|
||||||
<p class="replied-message">
|
<p class="replied-message">
|
||||||
${version && version.toString() === '1' ? html`
|
${version && version.toString() === '1' ? html`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user