mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 17:55:51 +00:00
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:") {
|
||||
|
||||
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);
|
||||
|
@ -797,7 +797,7 @@ class MessageTemplate extends LitElement {
|
||||
class=${this.myAddress !== repliedToData.sender
|
||||
? "original-message-sender"
|
||||
: "message-data-my-name"}>
|
||||
${repliedToData.senderName ? cropAddress(repliedToData.sender) : ''}
|
||||
${repliedToData.senderName ? repliedToData.senderName : cropAddress(repliedToData.sender) }
|
||||
</p>
|
||||
<p class="replied-message">
|
||||
${version && version.toString() === '1' ? html`
|
||||
|
Loading…
x
Reference in New Issue
Block a user