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

Ability to export chats using a time range (instead of number of messages) #26926

Open
nekohayo opened this issue Jan 24, 2024 · 8 comments
Open

Comments

@nekohayo
Copy link

nekohayo commented Jan 24, 2024

Your use case

The basic chat log exporting feature implemented in #2630 works, but I find it very limiting when you can only specify these types of ranges:

  • "Current timeline":
    It is unclear what this actually does. Like, what constitutes the beginning and end of "current"?
  • "From the beginning":
    Very rarely do you actually want to do this.
  • "Specify a number of messages":
    I never know exactly what amount of messages I want to export, because I'm not going to start counting them myself... so in practice I always end up vastly underestimating or vastly overestimating.

I would like to be able to export using a range of dates (and/or hours, depending on the situation).
Ex: from YYYY-MM-DD HH:MM to YYYY-MM-DD, or "last 6 hours", etc.

Have you considered any alternatives?

No response

Additional context

No response

@t3chguy
Copy link
Member

t3chguy commented Jan 24, 2024

Related #19310

@nekohayo
Copy link
Author

nekohayo commented Jan 25, 2024

Indeed, I was not able to find that other ticket because it was titled too generically; that said, it also talks about other features / a wider scope. This ticket here is a subset of it that could potentially be implemented independently as a first step.

@fran-f
Copy link

fran-f commented Nov 13, 2024

Getting close to the end of the year, this issue comes back to my mind. Having a way to download the past 12 month of messages would make incremental backups possible.

There is already a bit of code commented out here:

// if (this.exportOptions.startDate && mxEv.getTs() < this.exportOptions.startDate) {
// // Once the last message received is older than the start date, we break out of both the loops
// limit = 0;
// break;
// }

Would be great to have a start date selector in the export dialog, without the complex interface discussed in #19310.

@t3chguy
Copy link
Member

t3chguy commented Nov 13, 2024

Contributions welcome

@fran-f
Copy link

fran-f commented Nov 13, 2024

I'll start by contributing a mock-up!

image

@fran-f
Copy link

fran-f commented Nov 13, 2024

Alternatively, with a date range. The assumed time would be 00:00:00 for the start date, and 23:59:59 for the end date.

Although looking at the export loop, which is implemented as "get a page, then go back a page", start date only might be an easier first step.

image

@t3chguy
Copy link
Member

t3chguy commented Nov 13, 2024

Keep in mind timestamps may appear in pages out of order, as servers over federation may not have synchronised clocks, heterogenous distributed systems and all that

@fran-f
Copy link

fran-f commented Nov 13, 2024

Thanks for pointing that out. Then a single event is not enough to signal the boundary of a range, but we should probably check "a few minutes further" for safety?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants