mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-08-29 07:27:16 +00:00
* feat: share location channel invites via the system share sheet Adds text-first geohash invites (deep link + App Store URL) from channel rows and the active-channel header, with an OpSec warning for neighborhood-or-finer cells. Closes #1497 Co-authored-by: Cursor <cursoragent@cursor.com> * fix: add Localizable.xcstrings entries for channel share copy Cover all six new share/done keys across the 30-locale catalog so LocalizationCoverageTests and non-English builds stop falling back to English defaults. Co-authored-by: Cursor <cursoragent@cursor.com> * chore: retrigger CI after unrelated VoiceRecorder flake Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
876 B
Swift
27 lines
876 B
Swift
//
|
|
// ChannelShareTests.swift
|
|
// bitchatTests
|
|
//
|
|
// This is free and unencumbered software released into the public domain.
|
|
// For more information, see <https://unlicense.org>
|
|
//
|
|
|
|
import Testing
|
|
@testable import bitchat
|
|
|
|
struct ChannelShareTests {
|
|
@Test func payloadIncludesGeohashDeepLinkAndStoreURL() {
|
|
let text = ChannelShare.payload(forGeohash: "u4pru")
|
|
#expect(text.contains("#u4pru"))
|
|
#expect(text.contains("bitchat://geohash/u4pru"))
|
|
#expect(text.contains(ChannelShare.appStoreURL))
|
|
#expect(!text.lowercased().contains("i'm in"))
|
|
}
|
|
|
|
@Test func precisionWarningStartsAtNeighborhood() {
|
|
#expect(!ChannelShare.shouldWarn(forGeohash: "u4pru")) // city = 5
|
|
#expect(ChannelShare.shouldWarn(forGeohash: "u4pruy")) // neighborhood = 6
|
|
#expect(ChannelShare.shouldWarn(forGeohash: "u4pruyzd"))
|
|
}
|
|
}
|