Skip to content

Commit 4c5a376

Browse files
committed
ffi: add missing RelayMessage
1 parent e99733f commit 4c5a376

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

bindings/nostr-ffi/src/message/relay.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ pub enum RelayMessage {
2626
subscription_id: String,
2727
count: u64,
2828
},
29+
NegMsg {
30+
subscription_id: String,
31+
message: String,
32+
},
33+
NegErr {
34+
subscription_id: String,
35+
code: String,
36+
},
2937
}
3038

3139
impl From<NRelayMessage> for RelayMessage {
@@ -59,6 +67,20 @@ impl From<NRelayMessage> for RelayMessage {
5967
subscription_id: subscription_id.to_string(),
6068
count: count as u64,
6169
},
70+
NRelayMessage::NegMsg {
71+
subscription_id,
72+
message,
73+
} => Self::NegMsg {
74+
subscription_id: subscription_id.to_string(),
75+
message,
76+
},
77+
NRelayMessage::NegErr {
78+
subscription_id,
79+
code,
80+
} => Self::NegErr {
81+
subscription_id: subscription_id.to_string(),
82+
code: code.to_string(),
83+
},
6284
}
6385
}
6486
}

bindings/nostr-ffi/src/nostr.udl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ interface RelayMessage {
136136
Ok(string event_id, boolean status, string message);
137137
Auth(string challenge);
138138
Count(string subscription_id, u64 count);
139+
NegMsg(string subscription_id, string message);
140+
NegErr(string subscription_id, string code);
139141
};
140142

141143
interface ZapRequestData {

bindings/nostr-sdk-ffi/src/nostr_sdk.udl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ interface RelayMessage {
156156
Ok(string event_id, boolean status, string message);
157157
Auth(string challenge);
158158
Count(string subscription_id, u64 count);
159+
NegMsg(string subscription_id, string message);
160+
NegErr(string subscription_id, string code);
159161
};
160162

161163
interface ZapRequestData {

0 commit comments

Comments
 (0)