mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 17:55:51 +00:00
websocket chat limit 1 and fix reply name
This commit is contained in:
parent
2e15d5015e
commit
15ec9c51ef
@ -2919,11 +2919,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}`;
|
||||
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}`;
|
||||
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);
|
||||
@ -3009,11 +3009,11 @@ class ChatPage extends LitElement {
|
||||
|
||||
if (window.parent.location.protocol === "https:") {
|
||||
|
||||
groupSocketLink = `wss://${nodeUrl}/websockets/chat/messages?txGroupId=${groupId}`;
|
||||
groupSocketLink = `wss://${nodeUrl}/websockets/chat/messages?txGroupId=${groupId}&encoding=BASE64&limit=1`;
|
||||
} else {
|
||||
|
||||
// Fallback to http
|
||||
groupSocketLink = `ws://${nodeUrl}/websockets/chat/messages?txGroupId=${groupId}`;
|
||||
groupSocketLink = `ws://${nodeUrl}/websockets/chat/messages?txGroupId=${groupId}&encoding=BASE64&limit=1`;
|
||||
}
|
||||
|
||||
this.webSocket = new WebSocket(groupSocketLink);
|
||||
|
@ -642,7 +642,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.toString() === '1' ? html`
|
||||
|
Loading…
x
Reference in New Issue
Block a user