mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 08:21:47 +00:00
update for nostr-types: NOTIFY
This commit is contained in:
parent
5cf9686b47
commit
50c1289e67
@ -50,6 +50,7 @@ pub fn fetch(url: &str, filters: Vec<Filter>) -> Result<Vec<Event>, Error> {
|
||||
match relay_message {
|
||||
RelayMessage::Event(_, e) => events.push(*e),
|
||||
RelayMessage::Notice(s) => tracing::info!("NOTICE: {}", s),
|
||||
RelayMessage::Notify(s) => tracing::info!("NOTIFY: {}", s),
|
||||
RelayMessage::Eose(_) => {
|
||||
let message = ClientMessage::Close(SubscriptionId("111".to_owned()));
|
||||
let wire = match serde_json::to_string(&message) {
|
||||
@ -145,6 +146,7 @@ pub fn post(url: &str, event: Event) -> Result<(), Error> {
|
||||
tracing::info!("EVENT: {}", event);
|
||||
}
|
||||
RelayMessage::Notice(s) => tracing::info!("NOTICE: {}", s),
|
||||
RelayMessage::Notify(s) => tracing::info!("NOTIFY: {}", s),
|
||||
RelayMessage::Eose(_) => tracing::info!("EOSE"),
|
||||
RelayMessage::Ok(_id, ok, reason) => {
|
||||
tracing::info!("OK: ok={} reason={}", ok, reason)
|
||||
|
@ -97,6 +97,11 @@ impl Minion {
|
||||
RelayMessage::Notice(msg) => {
|
||||
tracing::warn!("{}: NOTICE: {}", &self.url, msg);
|
||||
}
|
||||
RelayMessage::Notify(msg) => {
|
||||
// We currently don't support this as a user-facing UI element, but we
|
||||
// can at least log it:
|
||||
tracing::warn!("{}: NOTIFY: {}", &self.url, msg);
|
||||
}
|
||||
RelayMessage::Eose(subid) => {
|
||||
let handle = self
|
||||
.subscription_map
|
||||
|
Loading…
Reference in New Issue
Block a user