mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 02:25:20 +00:00
PeerID 24/n: Nostr Transport and Embedding (#830)
This commit is contained in:
@@ -126,7 +126,7 @@ struct NostrProtocolTests {
|
||||
|
||||
// Build a DELIVERED ack embedded payload (geohash-style, no recipient peer ID)
|
||||
let messageID = "TEST-MSG-DELIVERED-1"
|
||||
let senderPeerID = "0123456789abcdef" // 8-byte hex peer ID
|
||||
let senderPeerID = PeerID(str: "0123456789abcdef") // 8-byte hex peer ID
|
||||
|
||||
let embedded = try #require(
|
||||
NostrEmbeddedBitChat.encodeAckForNostrNoRecipient(type: .delivered, messageID: messageID, senderPeerID: senderPeerID),
|
||||
@@ -176,7 +176,7 @@ struct NostrProtocolTests {
|
||||
let recipient = try NostrIdentity.generate()
|
||||
|
||||
let messageID = "TEST-MSG-READ-1"
|
||||
let senderPeerID = "fedcba9876543210" // 8-byte hex peer ID
|
||||
let senderPeerID = PeerID(str: "fedcba9876543210") // 8-byte hex peer ID
|
||||
let embedded = try #require(
|
||||
NostrEmbeddedBitChat.encodeAckForNostrNoRecipient(type: .readReceipt, messageID: messageID, senderPeerID: senderPeerID),
|
||||
"Failed to embed read ack"
|
||||
|
||||
Reference in New Issue
Block a user