fix mailbox
This commit is contained in:
Vendored
+7
-2
@@ -641,11 +641,15 @@
|
||||
function resetAddressInput() {
|
||||
serverAddressInput.value = currentAddress.value;
|
||||
}
|
||||
UDN.onconnect = () => {
|
||||
isConnected.value = true;
|
||||
function subscribeChannels() {
|
||||
chats.value.forEach((chat) => {
|
||||
UDN.subscribe(chat.primaryChannel.value);
|
||||
});
|
||||
}
|
||||
UDN.onconnect = () => {
|
||||
isConnected.value = true;
|
||||
subscribeChannels();
|
||||
if (mailboxId.value != "") UDN.connectMailbox(mailboxId.value);
|
||||
};
|
||||
UDN.onmessage = (data) => {
|
||||
chats.value.forEach((chat) => {
|
||||
@@ -683,6 +687,7 @@
|
||||
UDN.onmailboxdelete = () => {
|
||||
isMailboxActive.value = false;
|
||||
mailboxId.value = "";
|
||||
subscribeChannels();
|
||||
};
|
||||
var isEncryptionAvailable = window.crypto.subtle != void 0;
|
||||
var senderName = restoreState("sender-name", "");
|
||||
|
||||
+9
-4
@@ -56,13 +56,17 @@ export function resetAddressInput(): void {
|
||||
serverAddressInput.value = currentAddress.value;
|
||||
}
|
||||
|
||||
// listeners
|
||||
UDN.onconnect = () => {
|
||||
isConnected.value = true;
|
||||
|
||||
export function subscribeChannels() {
|
||||
chats.value.forEach((chat) => {
|
||||
UDN.subscribe(chat.primaryChannel.value);
|
||||
});
|
||||
}
|
||||
|
||||
// listeners
|
||||
UDN.onconnect = () => {
|
||||
isConnected.value = true;
|
||||
subscribeChannels();
|
||||
if (mailboxId.value != "") UDN.connectMailbox(mailboxId.value);
|
||||
};
|
||||
|
||||
UDN.onmessage = (data) => {
|
||||
@@ -115,6 +119,7 @@ UDN.onmailboxconnect = () => {
|
||||
UDN.onmailboxdelete = () => {
|
||||
isMailboxActive.value = false;
|
||||
mailboxId.value = "";
|
||||
subscribeChannels();
|
||||
};
|
||||
|
||||
// MISC
|
||||
|
||||
Reference in New Issue
Block a user