finish mailbox

This commit is contained in:
marlon-erler
2024-07-09 00:30:57 +02:00
parent 3b9e5038ca
commit 58475ff68b
5 changed files with 45 additions and 20 deletions
+15 -1
View File
@@ -37,12 +37,26 @@ UDN.subscribe("my-channel");
UDN.unsubscribe("my-channel");
// mailbox
UDN.onmailbox = (mailboxId: string) => {
UDN.onmailboxcreate = (mailboxId: string) => {
UDN.connectMailbox(mailboxId);
}
UDN.onmailboxconnect = (mailboxId: string) => {
UDN.deleteMailbox(mailboxId);
}
UDN.onmailboxdelete = (mailboxId: string) => {
console.log("mailbox deleted");
}
UDN.requestMailbox();
```
# Changelog
## 1.0.5
- add mailbox support
## 1.0.6
- add error handling with `connect()`
- add `onmailboxdelete` listener