Repository navigation
Add prepare_conversation_settings_change for duration, mute, and screen capture - #35
Open
santiagomed wants to merge 28 commits into
Open
santiagomed wants to merge 28 commits into
santiagomed wants to merge 28 commits into
Conversation
Thread an optional QuickReply through EncryptMessageParams and EncryptReplyParams into the message content builders, so a quick-reply request or response sent by the SDK decrypts back to the same public QuickReply value. Unset keeps the content unchanged.
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #34.
Adds a signer for conversation setting changes, available in every binding:
message_duration(+ttl_msec)ConversationMetadataChangeEvent.MessageDurationChangeremove_message_duration…MessageDurationRemovemute/unmute…MuteConversation/…UnmuteConversationenable_screen_capture_blocking/disable_screen_capture_blocking…EnableScreenCaptureBlocking/…DisableScreenCaptureBlockingThe result is a single
ActionSignature, the same shapeprepare_message_deletereturns. Every field matches the thrift schema in the repo. Mute and unmute follow the native clients: they are signed for the sender's own{sender}:{sender}conversation, with the target conversation listed in the event. Signed changes round-trip through the existing verifier.API (builder pattern, additive only):
ConversationSettingsParams::new(conversation_id, ConversationSetting::MessageDuration { ttl_msec })withwith_identity.ConversationSetting::from_nameparses the names, and a new publicsignatures::build_action_signaturehelper is added.prepare_conversation_settings_change(conversation_id, setting, *, ttl_msec=None, sender_id=None, signing_key_version=None)prepareConversationSettingsChange({ conversationId, setting, ttlMsec })PrepareConversationSettingsChange(ConversationSettingsParams{…})withSetting…constantsConversationSettingenum plusTtlMsec/ttlMsecInput errors say what to pass:
ttl_msecmissing, not positive, or set for a setting other thanmessage_durationttlMsec(JS)Screen-capture detection is not offered, because the native clients never send it.
Docs:
docs/API.mdgets a table row, a section, and Rust/JS/Python snippets. The exampleChatCorewrappers in all six languages get aprepare_settings_changehelper.Tests
make ci(fmt, clippy-D warnings, license check, workspace tests): 562 core tests pass, 7 of them new.