ios: channels and chat relays ui (#6634)

This commit is contained in:
spaced4ndy authored and GitHub committed 2026-03-05 09:13:24 +00:00
1 parent 567a89d49d
commit b97868d79f
80 files changed
+4170 -971

No files matched your search

+14
View File
@@ -47,6 +47,7 @@ import Data.Time.Clock (UTCTime, nominalDay)
import Language.Haskell.TH.Syntax (lift)
import Simplex.Chat.Operators.Conditions
import Simplex.Chat.Types (ShortLinkContact, User)
import Simplex.Chat.Types.Shared (RelayStatus)
import Simplex.Messaging.Agent.Env.SQLite (ServerCfg (..), ServerRoles (..), allRoles)
import Simplex.Messaging.Agent.Protocol (sameShortLinkContact)
import Simplex.Messaging.Agent.Store.DB (FromField (..), ToField (..), fromTextField_)
@@ -271,6 +272,17 @@ data UserChatRelay' s = UserChatRelay
}
deriving (Show)
deriving instance Eq UserChatRelay
data GroupRelay = GroupRelay
{ groupRelayId :: Int64,
groupMemberId :: Int64,
userChatRelay :: UserChatRelay,
relayStatus :: RelayStatus,
relayLink :: Maybe ShortLinkContact
}
deriving (Eq, Show)
-- for setting chat relays via CLI API
data CLINewRelay = CLINewRelay
{ address :: ShortLinkContact,
@@ -585,3 +597,5 @@ instance FromJSON UpdatedUserOperatorServers where
$(JQ.deriveJSON (sumTypeJSON $ dropPrefix "USE") ''UserServersError)
$(JQ.deriveJSON (sumTypeJSON $ dropPrefix "USW") ''UserServersWarning)
$(JQ.deriveJSON defaultJSON ''GroupRelay)