fix teleport tag and icons (#303)

This commit is contained in:
callebtc
2025-08-24 02:03:00 +02:00
committed by GitHub
parent 37c8c79310
commit cb7b01ad81
4 changed files with 34 additions and 5 deletions
@@ -181,7 +181,8 @@ class NostrGeohashService(
content = content,
geohash = channel.geohash,
senderIdentity = identity,
nickname = nickname
nickname = nickname,
teleported = teleported
)
val nostrRelayManager = NostrRelayManager.getInstance(application)
@@ -99,7 +99,8 @@ object NostrProtocol {
content: String,
geohash: String,
senderIdentity: NostrIdentity,
nickname: String? = null
nickname: String? = null,
teleported: Boolean = false
): NostrEvent {
val tags = mutableListOf<List<String>>()
tags.add(listOf("g", geohash))
@@ -108,6 +109,11 @@ object NostrProtocol {
tags.add(listOf("n", nickname))
}
if (teleported) {
// Use tag consistent with event handlers ("t","teleport")
tags.add(listOf("t", "teleport"))
}
val event = NostrEvent(
pubkey = senderIdentity.publicKeyHex,
createdAt = (System.currentTimeMillis() / 1000).toInt(),