mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-27 08:35:58 +00:00
core, ui: chat relay addresses (#6191)
This commit is contained in:
@@ -4666,6 +4666,7 @@ public enum SimplexLinkType: String, Decodable, Hashable {
|
||||
case invitation
|
||||
case group
|
||||
case channel
|
||||
case relay
|
||||
|
||||
public var description: String {
|
||||
switch self {
|
||||
@@ -4673,6 +4674,7 @@ public enum SimplexLinkType: String, Decodable, Hashable {
|
||||
case .invitation: return NSLocalizedString("SimpleX one-time invitation", comment: "simplex link type")
|
||||
case .group: return NSLocalizedString("SimpleX group link", comment: "simplex link type")
|
||||
case .channel: return NSLocalizedString("SimpleX channel link", comment: "simplex link type")
|
||||
case .relay: return NSLocalizedString("SimpleX relay link", comment: "simplex link type")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -4437,13 +4437,15 @@ enum class SimplexLinkType(val linkType: String) {
|
||||
contact("contact"),
|
||||
invitation("invitation"),
|
||||
group("group"),
|
||||
channel("channel");
|
||||
channel("channel"),
|
||||
relay("relay");
|
||||
|
||||
val description: String get() = generalGetString(when (this) {
|
||||
contact -> MR.strings.simplex_link_contact
|
||||
invitation -> MR.strings.simplex_link_invitation
|
||||
group -> MR.strings.simplex_link_group
|
||||
channel -> MR.strings.simplex_link_channel
|
||||
relay -> MR.strings.simplex_link_relay
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
<string name="simplex_link_invitation">SimpleX one-time invitation</string>
|
||||
<string name="simplex_link_group">SimpleX group link</string>
|
||||
<string name="simplex_link_channel">SimpleX channel link</string>
|
||||
<string name="simplex_link_relay">SimpleX relay link</string>
|
||||
<string name="simplex_link_connection">via %1$s</string>
|
||||
<string name="simplex_link_mode">SimpleX links</string>
|
||||
<string name="simplex_link_mode_description">Description</string>
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ constraints: zip +disable-bzip2 +disable-zstd
|
||||
source-repository-package
|
||||
type: git
|
||||
location: https://github.com/simplex-chat/simplexmq.git
|
||||
tag: 931c533a3ddb86345e95ac54e24df5474d9a349b
|
||||
tag: 2cedb66667fe4c6b0fed1a7a6f57cbb160695be1
|
||||
|
||||
source-repository-package
|
||||
type: git
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"https://github.com/simplex-chat/simplexmq.git"."931c533a3ddb86345e95ac54e24df5474d9a349b" = "03s3gnb21fnlnmayy654aq56q4kwva48mfs3qacvr7asm8fpk2p3";
|
||||
"https://github.com/simplex-chat/simplexmq.git"."2cedb66667fe4c6b0fed1a7a6f57cbb160695be1" = "0w326lpbn6aaibqms545j0yn6sb9myr0yjc3f5hmykpjdfryw0g3";
|
||||
"https://github.com/simplex-chat/hs-socks.git"."a30cc7a79a08d8108316094f8f2f82a0c5e1ac51" = "0yasvnr7g91k76mjkamvzab2kvlb1g5pspjyjn2fr6v83swjhj38";
|
||||
"https://github.com/simplex-chat/direct-sqlcipher.git"."f814ee68b16a9447fbb467ccc8f29bdd3546bfd9" = "1ql13f4kfwkbaq7nygkxgw84213i0zm7c1a8hwvramayxl38dq5d";
|
||||
"https://github.com/simplex-chat/sqlcipher-simple.git"."a46bd361a19376c5211f1058908fc0ae6bf42446" = "1z0r78d8f0812kxbgsm735qf6xx8lvaz27k1a0b4a2m0sshpd5gl";
|
||||
|
||||
@@ -3534,6 +3534,7 @@ processChatCommand vr nm = \case
|
||||
Just (cReq, g) -> pure $ Just (con cReq, CPGroupLink (GLPOwnLink g))
|
||||
Nothing -> (gPlan =<<) <$> getGroupViaShortLinkToConnect db vr user l'
|
||||
CCTChannel -> throwCmdError "channel links are not supported in this version"
|
||||
CCTRelay -> throwCmdError "chat relay links are not supported in this version"
|
||||
connectWithPlan :: User -> IncognitoEnabled -> ACreatedConnLink -> ConnectionPlan -> CM ChatResponse
|
||||
connectWithPlan user@User {userId} incognito ccLink plan
|
||||
| connectionPlanProceed plan = do
|
||||
|
||||
@@ -72,7 +72,7 @@ mentionedNames = mapMaybe (\(FormattedText f _) -> mentionedName =<< f)
|
||||
Mention name -> Just name
|
||||
_ -> Nothing
|
||||
|
||||
data SimplexLinkType = XLContact | XLInvitation | XLGroup | XLChannel
|
||||
data SimplexLinkType = XLContact | XLInvitation | XLGroup | XLChannel | XLRelay
|
||||
deriving (Eq, Show)
|
||||
|
||||
colored :: Color -> Format
|
||||
@@ -326,6 +326,7 @@ markdownP = mconcat <$> A.many' fragmentP
|
||||
CCTGroup -> XLGroup
|
||||
CCTChannel -> XLChannel
|
||||
CCTContact -> XLContact
|
||||
CCTRelay -> XLRelay
|
||||
strEncodeText :: StrEncoding a => a -> Text
|
||||
strEncodeText = safeDecodeUtf8 . strEncode
|
||||
|
||||
|
||||
Reference in New Issue
Block a user