Browse Source

Merge pull request #158 from Philreact/ugfix/reply-name-and-limit-websocket

bugfix/reply name and limit websocket
qortal-ui-dev
AlphaX-Projects 1 year ago committed by GitHub
parent
commit
bd534c67bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      qortal-ui-plugins/plugins/core/components/ChatPage.js
  2. 2
      qortal-ui-plugins/plugins/core/components/ChatScroller.js

8
qortal-ui-plugins/plugins/core/components/ChatPage.js

@ -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);

2
qortal-ui-plugins/plugins/core/components/ChatScroller.js

@ -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…
Cancel
Save