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:") {
|
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 {
|
} else {
|
||||||
|
|
||||||
// Fallback to http
|
// 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);
|
this.webSocket = new WebSocket(directSocketLink);
|
||||||
@ -3009,11 +3009,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}`;
|
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}`;
|
groupSocketLink = `ws://${nodeUrl}/websockets/chat/messages?txGroupId=${groupId}&encoding=BASE64&limit=1`;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.webSocket = new WebSocket(groupSocketLink);
|
this.webSocket = new WebSocket(groupSocketLink);
|
||||||
|
@ -642,7 +642,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.toString() === '1' ? html`
|
${version.toString() === '1' ? html`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user