mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-24 10:42:05 +00:00
wip
This commit is contained in:
@@ -9,14 +9,14 @@ import Text.RawString.QQ (r)
|
||||
m20260601_group_roster :: Text
|
||||
m20260601_group_roster =
|
||||
[r|
|
||||
ALTER TABLE groups ADD COLUMN roster_version INTEGER;
|
||||
ALTER TABLE groups ADD COLUMN roster_version BIGINT;
|
||||
ALTER TABLE groups ADD COLUMN roster_msg_body BYTEA;
|
||||
ALTER TABLE groups ADD COLUMN roster_msg_chat_binding TEXT;
|
||||
ALTER TABLE groups ADD COLUMN roster_msg_signatures BYTEA;
|
||||
ALTER TABLE groups ADD COLUMN roster_sending_owner_gm_id BIGINT;
|
||||
ALTER TABLE groups ADD COLUMN roster_broker_ts TIMESTAMPTZ;
|
||||
ALTER TABLE groups ADD COLUMN roster_blob BYTEA;
|
||||
ALTER TABLE groups ADD COLUMN roster_pending_version INTEGER;
|
||||
ALTER TABLE groups ADD COLUMN roster_pending_version BIGINT;
|
||||
ALTER TABLE groups ADD COLUMN roster_pending_digest BYTEA;
|
||||
ALTER TABLE groups ADD COLUMN roster_pending_msg_body BYTEA;
|
||||
ALTER TABLE groups ADD COLUMN roster_pending_msg_chat_binding TEXT;
|
||||
|
||||
@@ -2075,16 +2075,11 @@ newtype StoreCxt = StoreCxt {vr :: VersionRangeChat}
|
||||
pattern VersionChat :: Word16 -> VersionChat
|
||||
pattern VersionChat v = Version v
|
||||
|
||||
data RosterVersion
|
||||
|
||||
instance VersionScope RosterVersion
|
||||
|
||||
type VersionRoster = Version RosterVersion
|
||||
|
||||
pattern VersionRoster :: Word16 -> VersionRoster
|
||||
pattern VersionRoster v = Version v
|
||||
|
||||
{-# COMPLETE VersionRoster #-}
|
||||
-- A monotonic per-change counter, not a negotiated protocol version: Int64 rather than the Word16 of
|
||||
-- Version, so a long-lived high-churn channel cannot wrap and be permanently rejected by relays (v >= cur).
|
||||
newtype VersionRoster = VersionRoster Int64
|
||||
deriving (Eq, Ord, Show)
|
||||
deriving newtype (FromJSON, ToJSON, FromField, ToField)
|
||||
|
||||
-- this newtype exists to have a concise JSON encoding of version ranges in chat protocol messages in the form of "1-2" or just "1"
|
||||
newtype ChatVersionRange = ChatVersionRange {fromChatVRange :: VersionRangeChat} deriving (Eq, Show)
|
||||
|
||||
Reference in New Issue
Block a user