Add message to handlers
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@welshman/net",
|
||||
"version": "0.0.19",
|
||||
"version": "0.0.20",
|
||||
"author": "hodlbod",
|
||||
"license": "MIT",
|
||||
"description": "Utilities for connecting with nostr relays.",
|
||||
@@ -32,7 +32,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@welshman/lib": "0.0.15",
|
||||
"@welshman/util": "0.0.27",
|
||||
"@welshman/util": "0.0.28",
|
||||
"isomorphic-ws": "^5.0.0",
|
||||
"ws": "^8.16.0"
|
||||
}
|
||||
|
||||
@@ -83,11 +83,11 @@ export const publish = (request: PublishRequest) => {
|
||||
// Delegate to our executor
|
||||
const executorSub = executor.publish(event, {
|
||||
verb: request.verb || "EVENT",
|
||||
onOk: (url: string, eventId: string, ok: boolean) => {
|
||||
onOk: (url: string, eventId: string, ok: boolean, message: string) => {
|
||||
if (ok) {
|
||||
pub.emitter.emit(PublishStatus.Success, url)
|
||||
pub.emitter.emit(PublishStatus.Success, url, message)
|
||||
} else {
|
||||
pub.emitter.emit(PublishStatus.Failure, url)
|
||||
pub.emitter.emit(PublishStatus.Failure, url, message)
|
||||
}
|
||||
},
|
||||
onError: (url: string) => {
|
||||
|
||||
Reference in New Issue
Block a user