Repository navigation
v0.2.0
Added
-
client.saveChanges()(JS) andStore::export_changessave only the rows written since the
last save, andClient.start({snapshot, changes})andStore::open_snapshot_with_changes
open a snapshot with the changes kept after it. A change costs what it wrote: with 30,000
messages in wasm,save()takes 95 ms for 22.5 MB, andsaveChanges()after one message
under 1 ms for 1 KB. Each delta is MAC'd and chained to its snapshot and the delta before
it; a missing, repeated or reordered one isStoreError::ChangesDoNotFollow(JS
changes_do_not_follow), and deltas of an older snapshot are skipped. Breaking:
StoreErrorhas this new variant, so an exhaustivematchon it needs an arm. The README and the
Node bot example keep a log of changes instead of saving the whole store on every change. -
Disappearing messages, as SimpleX Chat 7.1.4 has them.
Request::SetTimer { chat, ttl }
(friend.set_timer,group.set_timer; JSfriend.setTimer(seconds),
group.setTimer(seconds),nullfor off) offers a friend a timer in the profile they are
sent, or sets a group's as an owner. Each message then carries itsttland is deleted with
its file: the user's own counts from sending, a received one from whenMarkReadreads it.
A friend's timer is taken over from their profile without an answer, as the official apps
do, and the conversation gets aChatNotice::Timerwhenever the timer that applies changes.
The timers last across restarts: what came due while the client was off goes at the next
start.Friend.timerandChatGroup.timergive the timer that applies, and
ChatMessage.timed(JSmessage.ttl,message.expiresAt) a message's own. Breaking:
Request,RequestKindandChatNoticehave new variants andChatMessage,Friendand
ChatGroupnew fields. -
Chat preferences, the user's own and per friend, as SimpleX Chat 7.1.4 has them.
Request::SetPrefs { friend, prefs }(client.set_prefs,friend.set_prefs; JS
client.setPrefs({ voice: "no" }),friend.setPrefs(...)) sets full delete, reactions,
voice, files, calls and the "allow" of disappearing messages toalways,yesorno,
for every friend or over the user's own for one. Each friend whose profile it changes is
sent the new one (APIUpdateProfile,APISetContactPrefs). What is on between the user and
a friend follows both sides (prefEnabled; only disappearing messages are symmetric), and
shows inFriend.features(JSfriend.features);Friend.prefsandChatProfile.prefshold
what the user set. A voice message from a friend the user does not allow is no longer kept.
Breaking:RequestandRequestKindhave new variants,FriendandChatProfilenew
fields, andUserRecordis no longerEq. -
Group admin, as SimpleX Chat 7.1.4 has it:
Request::SetMemberRole,BlockMemberForAll,
RemoveMember(with or without the member's messages),DeleteGroup,SetGroupProfile
(name and description),SetGroupPrefsandModerate, with the senders' role checks from
Commands.hs (APIMembersRole,APIBlockMembersForAll,APIRemoveMembers,APIDeleteChat,
APIUpdateGroupProfile,APIDeleteMemberChatItem). Rust:member.set_role,
block_for_all,remove,group.delete,set_profile,set_prefs,message.moderate;
JS the same in camelCase. A role change goes to every current member and the member too; a
block to the others; a removal to all before the member's connection goes once delivered; an
invited member's new role goes in their invitation again. Deleting a group removes
everything kept about it.GroupMember.role,blocked_for_all,ChatGroup.roleand
descriptionshow the result, and a role change made by anyone now leaves a
ChatNotice::MemberRole. A live test runs all of it against two official CLIs.
Breaking:Request,RequestKindandChatNoticehave new variants,GroupMemberand
ChatGroupnew fields. -
What the user keeps for themselves, as SimpleX Chat 7.1.4 has it:
Request::DeleteForMe
(APIDeleteChatIteminternal),ClearChat(APIClearChat),MarkReadUpTo
(APIChatItemsRead),SetUnreadMark(APIChatUnread),SetAlias(APISetContactAlias,
APISetGroupAlias) andSetMessageTtl(APISetChatItemTTL,APISetChatTTL), which
deletes messages older than a TTL every half hour, for every chat or one, keeping a group's
last 12 hours. Rust:message.delete_for_me,mark_read_up_to,friend.clear,
set_unread_mark,set_alias,set_message_ttl(and onGroup),client.set_message_ttl;
JS the same in camelCase.Friend.alias,item_ttl,ChatGroup.alias,item_ttl,
ChatPreview.marked_unreadandChatProfile.item_ttlshow them, andEvent::Clearedsays a
chat was cleared. Breaking:Request,RequestKindandEventhave new variants, and
Friend,ChatGroup,ChatPreviewandChatProfilenew fields. -
Voice messages:
FileKind::Voice(JS"voice") sendsMCVoicewith its length, refused
where the friend or the group does not allow the user's voice messages (Commands.hs
featureAllowed SCFVoice forUser, Internal.hsprohibitedGroupContent). Received ones show
asMessageBody::Voice(Media)with theirdurationinstead of a plain file. JSsendFile
takes{ caption, duration, preview }as a fourth argument, which it could not send before.
Breaking:MessageBody::Voiceholds aMediainstead ofsecsandwave, and
FileKindhas a new variant. -
Link previews:
Request::SendLink { chat, text, preview, reply_to }(client.send_link;
JSfriend.sendLink(text, { uri, title, description, image })) sendsMCLink, and a
received link's preview is kept inChatMessage.link(JSmessage.link) instead of being
dropped; group history keeps it too. Breaking:Requesthas a new variant and
ChatMessagea new field. -
Forwarding:
Request::Forward { from, item, to }(friend.forward(&message),
group.forward; JS the same) sends a message to another chat as the user's own with
forward: true(APIForwardChatItems,mcForward): text and link previews as they are, a
file again when it is here, else its caption. A received forward shows in
ChatMessage.forwarded(JSmessage.forwarded). Breaking:Requesthas a new variant,
ChatMessagea new field, and the engine'ssend_filetakes aFileMeta. -
Live messages, written as the other side watches:
Request::SendLiveandUpdateLive { done }
(friend.send_live,message.update_live; JSsendLive,updateLive) sendlive: true
until done (APISendMessageslive,APIUpdateChatItem). Received ones show in
ChatMessage.live, and their updates are not marked edited (edited = itemLive /= Just True). A disappearing live message counts from when it is done. An edit now carries the
message's timer, as upstream's does. Breaking:Requesthas new variants and
ChatMessagea new field. -
Direct chats with group members:
Request::ContactMember { group, member, text }
(member.contact; JS the same) makes a one-time invitation and sends it withtextover the
member's group connection inx.grp.direct.inv(APICreateMemberContact,
APISendMemberContactInvitation), where the group allows the user direct messages. The member
shows as a friend, connecting, until they accept. Breaking:Requesthas a new variant. -
"Fix connection":
Request::SyncRatchet { chat, member, force }(friend.fix_connection,
member.fix_connection; JSfixConnection) starts a ratchet re-sync with a friend or a group
member, withforceeven while the connection works (APISyncContactRatchet,
APISyncGroupMemberRatchet). The engine already started one by itself when a connection
needed it. The agent port'ssynchronize_ratchettakesforce. Breaking:Requesthas a
new variant andAgentPort::synchronize_ratcheta new argument. -
Address settings:
Request::SetAddressSettings { auto_accept, auto_reply }
(client.set_address_settings; JSsetAddressSettings({ autoAccept, autoReply })) accepts
requests to the address as they come and sends the auto-reply to each friend made through it
once connected, however the request was accepted (APISetAddressSettings, Subscriber.hs
autoAccept,sendAutoReply).
Request::ShareAddress(on)(JSshareAddress) shows the address in the profile every
friend gets (APISetProfileAddress), and deleting the address takes it out. A friend's shown
address is inFriend.address; the settings inChatProfile. Breaking:Requesthas
new variants,FriendandChatProfilenew fields, andUserRecordandAddressRecordnew
fields. -
Incognito:
Request::CreateIncognitoInvite,ConnectIncognito(link)and
AcceptIncognito(request)(client.create_incognito_invite,connect_incognito,
request.accept_incognito; JScreateInvite({ incognito: true }),
connect(link, { incognito: true }),request.acceptIncognito()) make a friend who knows
the user only by a random name from upstream's word lists (generateRandomProfile), with
the default preferences and no picture, in the invitation's link data, the handshake and
every later profile.Friend.incognitoholds the name. A retried invitation stays incognito.
Joining a group through an incognito friend, inviting one into a group, and connecting to a
group link incognito are refused, as none of them could keep the user's profile out
(CEContactIncognitoCantInvite); an incognito friend is judged against the default
preferences, as they were sent (mergeUserChatPrefs'). Breaking:Requesthas new variants and
Frienda new field; JScreateInviteandconnecttake an optional options argument.
Fixed
- The profile sent to friends said disappearing messages were allowed, so an official app
offered its user a timer, but this client kept their messages for good. The timer is now
kept. A profile change now goes to each friend with their own timer in it, so renaming no
longer turns a friend's timer off.
Changed
- Through the tunnel, the TLS ClientHello goes out right behind the tunnel hello instead of
waiting for{"ok":true}, so connecting to a relay or file server takes one round trip
less. The relay's bytes are still refused until the tunnel says yes. - File uploads in wasm keep up to 768 KiB unacknowledged instead of 256 KiB. The pinned XFTP
server grants about 1 MiB, so an upload moves three times as much per round trip. - Tunnel Worker: it looks the relay's name up while the per-IP counter decides, rather than
after. A refused tunnel still readsrate_limitedortoo_many_tunnels, and now costs a
DNS lookup too. - The JS packages are built with a
wasm-releaseprofile (fat LTO, one codegen unit) and
wasm-opt -O3: the module shrinks from 5.1 MB to 3.3 MB (1.5 MB to 1.3 MB gzipped),
Ed25519 signing and verifying get about 10% faster, and Ed448 key generation about 25%.
scripts/build-js.shskipswasm-optwith a warning when binaryen is missing, except
underREQUIRE_WASM_OPT, which CI and the release set. - The SQLite store goes through rusqlite instead of ormlite (sqlx) on a private tokio runtime.
A sealed write takes about 20 µs instead of 80 µs and a read about 6 µs instead of 26 µs.
tokio, sqlx and rustls leave the native build: 156 crates in the lock file instead of 275,
and the stripped echo bot shrinks from 8.9 MB to 7.8 MB. Store files and their settings are
unchanged (WAL,synchronous = NORMAL,secure_delete,foreign_keys, a 5 s busy timeout). - A whole snapshot of a memory store is encoded from its rows in place instead of from a copy
of them: at 50,000 rows (30 MB) natively it takes 36 ms instead of 66 ms.