feat: optimize notifications
This commit is contained in:
parent
47e7a18f2e
commit
2855754648
26 changed files with 520 additions and 234 deletions
|
|
@ -164,7 +164,7 @@ class ClientService extends EventTarget {
|
|||
})
|
||||
})
|
||||
)
|
||||
this.dispatchEvent(new CustomEvent('eventPublished', { detail: event }))
|
||||
this.emitNewEvent(event)
|
||||
return result
|
||||
} catch (error) {
|
||||
if (error instanceof AggregateError) {
|
||||
|
|
@ -174,6 +174,10 @@ class ClientService extends EventTarget {
|
|||
}
|
||||
}
|
||||
|
||||
emitNewEvent(event: NEvent) {
|
||||
this.dispatchEvent(new CustomEvent('newEvent', { detail: event }))
|
||||
}
|
||||
|
||||
async signHttpAuth(url: string, method: string, description = '') {
|
||||
if (!this.signer) {
|
||||
throw new Error('Please login first to sign the event')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue