Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the expire timer #173

Merged
merged 1 commit into from
Jul 24, 2023
Merged

Set the expire timer #173

merged 1 commit into from
Jul 24, 2023

Conversation

Schmiddiii
Copy link
Contributor

@Schmiddiii Schmiddiii commented May 19, 2023

This sets the expire timer of a message such that the current expiration timer of a conversation stays the same (except in cases where it was explicitly set to another value).

It may be a little counterproductive when sending a message to (e.g.) a contact to query the timer for the thread which unwraps it back to querying the contact, but this method may potentially also be used to display the expiration timer.

Note that due to #171, I would guess that the expiration timer always stays the same for contacts directly after linking, e.g. changing it on an official client and then sending a message from presage, presage will set the expiration timer back to before the change.

This fixes #93.

P.S.: The panic when the group bytes are not 32 bytes in length is maybe not that good. Is there a reason for the parameter not being [u8; 32]?

This sets the expire timer of a message such that the current expiration
timer of a conversation stays the same (except in cases where it was
explicitly set to another value).

It may be a little counterproductive when sending a message to (e.g.) a
contact to query the timer for the thread which unwraps it back to
querying the contact, but this method may potentially also be used to
display the expiration timer.

Note that due to whisperfish#171, I would guess that the expiration timer always
stays the same for contacts directly after linking, e.g. changing it
on an official client and then sending a message from presage, presage
will set the expiration timer back to before the change.

This fixes whisperfish#93.
@gferon
Copy link
Collaborator

gferon commented Jul 24, 2023

Nice! Thanks for the patch.

The panic when the group bytes are not 32 bytes in length is maybe not that good. Is there a reason for the parameter not being [u8; 32]?

It's like that for backwards compatibility reasons, because Manager::send_message_to_group was introduced before the GroupMasterKeyBytes type got introduced in libsignal 😢

@gferon gferon merged commit 54ef5c6 into whisperfish:main Jul 24, 2023
@Schmiddiii Schmiddiii deleted the expire-timer branch July 24, 2023 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timed Messages
2 participants