diff options
Diffstat (limited to 'test_utils/src')
| -rw-r--r-- | test_utils/src/lib.rs | 2 | ||||
| -rw-r--r-- | test_utils/src/relay.rs | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/test_utils/src/lib.rs b/test_utils/src/lib.rs index 22bdf90..bdfc550 100644 --- a/test_utils/src/lib.rs +++ b/test_utils/src/lib.rs | |||
| @@ -135,7 +135,7 @@ pub fn make_event_old_or_change_user( | |||
| 135 | .build(keys.public_key()); | 135 | .build(keys.public_key()); |
| 136 | 136 | ||
| 137 | unsigned.created_at = | 137 | unsigned.created_at = |
| 138 | nostr::types::Timestamp::from(nostr::types::Timestamp::now().as_u64() - how_old_in_secs); | 138 | nostr::types::Timestamp::from(nostr::types::Timestamp::now().as_secs() - how_old_in_secs); |
| 139 | unsigned.id = Some(nostr::EventId::new( | 139 | unsigned.id = Some(nostr::EventId::new( |
| 140 | &keys.public_key(), | 140 | &keys.public_key(), |
| 141 | &unsigned.created_at, | 141 | &unsigned.created_at, |
diff --git a/test_utils/src/relay.rs b/test_utils/src/relay.rs index 313e824..9582bfd 100644 --- a/test_utils/src/relay.rs +++ b/test_utils/src/relay.rs | |||
| @@ -219,10 +219,13 @@ fn get_nreq( | |||
| 219 | let cm_result = ClientMessage::from_json(s); | 219 | let cm_result = ClientMessage::from_json(s); |
| 220 | if let Ok(ClientMessage::Req { | 220 | if let Ok(ClientMessage::Req { |
| 221 | subscription_id, | 221 | subscription_id, |
| 222 | filter, | 222 | filters, |
| 223 | }) = cm_result | 223 | }) = cm_result |
| 224 | { | 224 | { |
| 225 | return Ok((subscription_id.into_owned(), filter.into_owned())); | 225 | return Ok(( |
| 226 | subscription_id.into_owned(), | ||
| 227 | filters.into_iter().next().unwrap().into_owned(), | ||
| 228 | )); | ||
| 226 | } | 229 | } |
| 227 | } | 230 | } |
| 228 | bail!("not nostr event") | 231 | bail!("not nostr event") |