Location notes: drop 'teleport' tag from kind-1 events; simplify note builder API and usage

This commit is contained in:
jack
2025-09-13 10:32:35 +02:00
parent 086699961d
commit cd3dea3dc4
2 changed files with 2 additions and 7 deletions
+1 -5
View File
@@ -129,16 +129,12 @@ struct NostrProtocol {
content: String,
geohash: String,
senderIdentity: NostrIdentity,
nickname: String? = nil,
teleported: Bool = false
nickname: String? = nil
) throws -> NostrEvent {
var tags = [["g", geohash]]
if let nickname = nickname?.trimmingCharacters(in: .whitespacesAndNewlines), !nickname.isEmpty {
tags.append(["n", nickname])
}
if teleported {
tags.append(["t", "teleport"])
}
let event = NostrEvent(
pubkey: senderIdentity.publicKeyHex,
createdAt: Date(),
+1 -2
View File
@@ -71,8 +71,7 @@ final class LocationNotesManager: ObservableObject {
content: trimmed,
geohash: geohash,
senderIdentity: id,
nickname: nickname,
teleported: LocationChannelManager.shared.teleported
nickname: nickname
)
let relays = GeoRelayDirectory.shared.closestRelays(toGeohash: geohash, count: TransportConfig.nostrGeoRelayCount)
NostrRelayManager.shared.sendEvent(event, to: relays)