mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-06-30 20:21:51 +00:00
core: supporter badges using anonymous BBS credentials (#7040)
* core: supporter badges using anonymous BBS credentials * badges in profiles * badge in profiles * process badges * update simplexmq * update simplexmq * change types * fix migration * migration * update simplexmq * fix bot API, schema * fix postgresql build * refactor * postgresql schema * correctly set badges in all cases * badges ffi * plan, bot types * FFI * FFI: export badge symbols * add extra field * refactor badge types to GADT * configurable badge key * add badge to profile, test * ui: badge images * generate badge key and sign badge * badge sign in CLI * fix commands, ui * rename badges * Binary * image size, migration * update badge images, add public key * send badges in more cases * update UI, tests * bot types, schema * postgres schema * tone down badges * revert formula * refactor badges * smaller badges * badge position * better badge position * simpler * position * move position * update simplexmq * show badge after name * badge layout * fix badge * debug badge height * shift badge * fix badge in member name * bigger badge * badge layout * differentiate badge colors * more avatars for the user's profiles * refactor * remove color filter * alerts * multiple keys, old expired * use new BBS api * update badge keys, bot api * presentation header * simplify * parser * update iOS images * update public keys * query plans * update simplexmq * refactor badge types * simplexmq * bot api types * update simplexmq - commoncrypto flag * update simplexmq * pass commoncrypto flag to simplexmq in nix iOS build * ios ui * update core library, fixes * badge layout * badge size * badge gap * remove extensions * simplify * share badge in more events, reverify badge if verification failed * larger files with badges * allow sending larger files * simpler * update simplexmq * better decoder for badge keys * update simplexmq --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> Co-authored-by: shum <github.shum@liber.li>
This commit is contained in:
@@ -138,6 +138,21 @@ AgentErrorType_Tag = Literal["CMD", "CONN", "NO_USER", "SMP", "NTF", "XFTP", "FI
|
||||
class AutoAccept(TypedDict):
|
||||
acceptIncognito: bool
|
||||
|
||||
class BadgeInfo(TypedDict):
|
||||
badgeType: "BadgeType"
|
||||
badgeExpiry: NotRequired[str] # ISO-8601 timestamp
|
||||
badgeExtra: str
|
||||
|
||||
class BadgeProof(TypedDict):
|
||||
badgeKeyIdx: int # int
|
||||
presHeader: str
|
||||
proof: str
|
||||
badgeInfo: "BadgeInfo"
|
||||
|
||||
BadgeStatus = Literal["active", "expired", "expiredOld", "failed", "unknownKey"]
|
||||
|
||||
BadgeType = Literal["supporter", "legend", "investor"]
|
||||
|
||||
class BlockingInfo(TypedDict):
|
||||
reason: "BlockingReason"
|
||||
notice: NotRequired["ClientNotice"]
|
||||
@@ -1441,6 +1456,7 @@ class ContactShortLinkData(TypedDict):
|
||||
profile: "Profile"
|
||||
message: NotRequired["MsgContent"]
|
||||
business: bool
|
||||
localBadge: NotRequired["LocalBadge"]
|
||||
|
||||
ContactStatus = Literal["active", "deleted", "deletedByUser"]
|
||||
|
||||
@@ -2059,6 +2075,10 @@ class LinkPreview(TypedDict):
|
||||
image: str
|
||||
content: NotRequired["LinkContent"]
|
||||
|
||||
class LocalBadge(TypedDict):
|
||||
badge: "BadgeInfo"
|
||||
status: "BadgeStatus"
|
||||
|
||||
class LocalProfile(TypedDict):
|
||||
profileId: int # int64
|
||||
displayName: str
|
||||
@@ -2068,6 +2088,7 @@ class LocalProfile(TypedDict):
|
||||
contactLink: NotRequired[str]
|
||||
preferences: NotRequired["Preferences"]
|
||||
peerType: NotRequired["ChatPeerType"]
|
||||
localBadge: NotRequired["LocalBadge"]
|
||||
localAlias: str
|
||||
|
||||
MemberCriteria = Literal["all"]
|
||||
@@ -2318,6 +2339,7 @@ class Profile(TypedDict):
|
||||
contactLink: NotRequired[str]
|
||||
preferences: NotRequired["Preferences"]
|
||||
peerType: NotRequired["ChatPeerType"]
|
||||
badge: NotRequired["BadgeProof"]
|
||||
|
||||
class ProxyClientError_protocolError(TypedDict):
|
||||
type: Literal["protocolError"]
|
||||
@@ -3431,7 +3453,7 @@ class UserContactRequest(TypedDict):
|
||||
cReqChatVRange: "VersionRange"
|
||||
localDisplayName: str
|
||||
profileId: int # int64
|
||||
profile: "Profile"
|
||||
profile: "LocalProfile"
|
||||
createdAt: str # ISO-8601 timestamp
|
||||
updatedAt: str # ISO-8601 timestamp
|
||||
xContactId: NotRequired[str]
|
||||
|
||||
Reference in New Issue
Block a user