Closed Meteor0id closed 2 months ago
Since this option crops the backup file to only contain the threads specified, I think this is expected behavior (see also #221).
But, I will see if I can skip actually writing the blockedcontacts page if it is empty (with a warning issued), I believe I do that for at least some of the other pages as well (calllog).
And it's done. Let me know if this is satisfactory.
hmm that's kind of the opposite to what I had in mind, I thought it might be handy to have some mention of there not being any blocked contacts among current chats. Having that mentioned in the export adds some future deniability that there were any blocked contacts. But it's a small thing.
If you use --addexportdetails
, you could still infer there are no blocked contacts from the fact that the option was passed, but the page is not there (and no links to it).
The alternative I think is to actually generate an empty page, basically like it was already doing before. Maybe adding a bit of text ('none') somewhere, would that be preferable?
among the chats which were exported there are no blocked contacts
blocked contacts among current chats
Note that the chats and contacts are two entirely separate things. A backup can have blocked contacts, but 0 chats and the other way around. Also, this case does not have anything to do with cropping necessarily, it is not uncommon to have 0 blocked contacts in a backup file even without cropping.
If you use --addexportdetails, you could still infer there are no blocked contacts from the fact that the option was passed, but the page is not there (and no links to it).
right that is something
The alternative I think is to actually generate an empty page, basically like it was already doing before. Maybe adding a bit of text ('none') somewhere, would that be preferable?
that would be even better
Note that the chats and contacts are two entirely separate things. A backup can have blocked contacts, but 0 chats and the other way around. Also, this case does not have anything to do with cropping necessarily, it is not uncommon to have 0 blocked contacts in a backup file even without cropping.
I thought I still had a blocked contact in my test and I assumed it was not listed because of cropping, but maybe I was mistaken and there just wasn't one.
that would be even better
I don't mind that, I'll get to it when I find some time, maybe later this evening.
I thought I still had a blocked contact in my test and I assumed it was not listed because of cropping, but maybe I was mistaken and there just wasn't one.
It's possible there was one before the cropping, but if the contact was not referenced anywhere in the cropped-to threads, it would be removed by the cropping operation (as you noticed in #223)
For me this is the right outcome but maybe by default the list of blicked contacts should persist despite cropping by default (consider them goobal settings) and introduce --alsocropblockedcontactlist
To give others a choice
It was just a few minutes of work, so both blockedlist.html and calllog.html are now written even if they're empty.
It's simple, but would that work for you?
For me this is the right outcome but maybe by default the list of blicked contacts should persist despite cropping by default (consider them goobal settings) and introduce --alsocropblockedcontactlist
Nah, too much trouble for something I don't think anyone is looking for. I might reconsider if anyone requests it, but I'll just leave it be for now.
I used --cropthreadsbyname and noticed that on the export the blocked contacts list is entirely empty. That is actualyl the desired result, since I do have blocked contacts but there is no chat with them as participant among the chats I chose to export. However leaving this page entirely black might confuse or mislead someone in the future. Maybe add the text "among the chats which were exported there are no blocked contacts" to hint at this not being an export error, and to hint that there might still be blocked contacts among other chats.