Skip to content

Conversation

@Simon-Laux
Copy link
Contributor

@Simon-Laux Simon-Laux commented Oct 30, 2025

  • remove code for partial downloads
  • remove tests for partial downloads and make a list of them so we can discuss if we need to re-add some in the new system or not
  • make download full message methods fail for now with not implemented error and comment what should happen later doesn't need to change at this time (and possibly not at all)

I kept partial_download_msg_body stock string for now, as it may be reused in the new solution. because I made the linter ignore it, I added a to do item to #7367 to check if it was used in the end. edit: outdated, the stock string was removed meanwhile.

removed partial download tests:

part of #7367

@Simon-Laux Simon-Laux force-pushed the simon/remove-partial-download-of-messages branch from 0d46626 to 81ca8c2 Compare October 30, 2025 17:30
@Simon-Laux
Copy link
Contributor Author

Simon-Laux commented Oct 30, 2025

  • run and fix python tests
    • jsonrpc
    • cffi
  • solve that it stops receiving messages (when used in desktop)

@Simon-Laux Simon-Laux mentioned this pull request Oct 31, 2025
7 tasks
info!(context, "Message already partly in DB, replacing.");
Some(msg.chat_id)

// TODO: look at this place
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo comment

Copy link
Contributor Author

@Simon-Laux Simon-Laux Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that there may be existing message-stubs that are not downloaded yet. After updating, the "Download" button will probably become non-functional; this is fine. We should make sure that DC doesn't crash when clicking "Download".

currently I'm still asking myself whether we have to to make this sacrifice or if we can still have a last version that has an option to download old message stubs and remove it in the version after...

As of the time of writing the download logic still works, because I have only removed the partial download logic that creates the stubs so far.

my current feeling/idea is to remove it in a dedicated pr as soon as it makes problems / the implementation of the new method harder - that way this pr would also be focused on the removal of just the stub creation part of partial download.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not that big of a sacrifice:

  • download-on-demand is just an option (i.e. many people don't have it activated, since they don't change the settings)
  • this option never worked really well
  • It can already happen that you can't fully download a message, because it has been deleted on the server already.
  • The user sees that there is a failure, and can ask the sender to send the message again

It does make sense to remove only the partial-download logic in the PR here, and then remove the replace_msg_id logic in a later PR. But if there is any kind of effort in it, it's not worth it, esp. as we need pre-messages rather sooner than later for calls etc.

@Simon-Laux Simon-Laux marked this pull request as ready for review October 31, 2025 23:16
@Simon-Laux Simon-Laux marked this pull request as draft October 31, 2025 23:29
@Simon-Laux Simon-Laux changed the title remove: partial downloads remove: partial downloads - creation of the stub messages Oct 31, 2025
@Simon-Laux Simon-Laux marked this pull request as ready for review November 1, 2025 12:41
@Simon-Laux Simon-Laux force-pushed the simon/remove-partial-download-of-messages branch from 6c84e01 to 938c890 Compare November 6, 2025 13:22
@Simon-Laux Simon-Laux assigned Simon-Laux and unassigned Simon-Laux Nov 6, 2025
@Simon-Laux Simon-Laux changed the title remove: partial downloads - creation of the stub messages remove: partial downloads (remove creation of the stub messages) Nov 8, 2025
Copy link
Collaborator

@Hocuri Hocuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! LGTM once all comments are addressed (i.e. either resolved them, or commented why it's not worth it / doesn't make sense)

BTW, in general, it's good to request a review from some people using the Github UI once you've finished your PR, in order to get speedier reviews

info!(context, "Message already partly in DB, replacing.");
Some(msg.chat_id)

// TODO: look at this place
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not that big of a sacrifice:

  • download-on-demand is just an option (i.e. many people don't have it activated, since they don't change the settings)
  • this option never worked really well
  • It can already happen that you can't fully download a message, because it has been deleted on the server already.
  • The user sees that there is a failure, and can ask the sender to send the message again

It does make sense to remove only the partial-download logic in the PR here, and then remove the replace_msg_id logic in a later PR. But if there is any kind of effort in it, it's not worth it, esp. as we need pre-messages rather sooner than later for calls etc.

@Simon-Laux Simon-Laux force-pushed the simon/remove-partial-download-of-messages branch from 506ecc8 to e564a9b Compare November 12, 2025 19:36
@Simon-Laux Simon-Laux force-pushed the simon/remove-partial-download-of-messages branch from e564a9b to 05a1967 Compare November 12, 2025 19:38
@Simon-Laux
Copy link
Contributor Author

I don't see how this error is related to the changes in this pr. I'll merge it into the pre-message feature branch anyway now.

error: unresolved link to `Context::set_stock-translation`
   --> src/context.rs:141:11
    |
141 |     /// [`Context::set_stock-translation`] or [`Accounts::set_stock_translation`] calls.
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the struct `Context` has no field or associated item named `set_stock-translation`
    |
    = note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(rustdoc::broken_intra_doc_links)]`

@Simon-Laux Simon-Laux merged commit fa24dee into pre-messages Nov 14, 2025
27 of 28 checks passed
@Simon-Laux Simon-Laux deleted the simon/remove-partial-download-of-messages branch November 14, 2025 22:52
@Hocuri
Copy link
Collaborator

Hocuri commented Nov 18, 2025

I don't see how this error is related to the changes in this pr.

It was fixed by 75eb94e, rebasing on main or merging main will fix the problem

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.

6 participants