hoehermann / purple-gowhatsapp

Pidgin/libpurple plug-in for WhatsApp Web.
GNU General Public License v3.0
287 stars 35 forks source link

Downloading and Downloaded files accesibiltiy. #148

Closed samtrek closed 1 year ago

samtrek commented 1 year ago

The plugin does not have the problem of downloading files sent by contacts or members of a group, however most of the files indicate "still downloading" while the download stream is complete, thereby leaving the pidgin download page open and no way to access downloaded files. These files can be accessed from normal file managers and they are not corrupted, dont know if you can thinker with the plugin to direct pidgin that the download stream is over, so that the files can be accessed right from inside pidgin.

My suggestion: write to the chat the downloaded file path as link, clicking on these link will then open the files in default applications set by the said system or conceal the path to the file but still make the file accessible by clicking.

hoehermann commented 1 year ago

This is how it looks to me with Pidgin 2.14.8 on Ubuntu 22.04:

received_file

As you can see, Pidgin automatically adds a link to the downloaded file. I also on Arch just to be sure. If this is not sufficient, you may use the plug-in's new "attachment message" option to have a link inserted.

Under the hood, some ugly things are happening: In fact, whatsmeow (the library I am using for accessing WhatsApp) downloads the file instantly. After the download has completed, the user is asked where they want to put the file. This means: File transfers are either not started (awaiting user confirmation), or finished. There is no in-between (unless purple has a hiccup or something). I actually had to uncheck the "close this window" boxes to take the screenshot. Are you referring to another window I am currently not considering?

samtrek commented 1 year ago

2023-01-08_20-29 All I want is seen in your own pidgin window up there, mine just wont follow the same pattern. Can you guide me on how to write the file as link within the received message, in the examples you gave for the incoming file message can you guide me how to modify it to include the file as a link. I am using pidgin 2.14.12

hoehermann commented 1 year ago

Oh, indeed after 1d02278206d2 there is a new if in purple's ft.c which changes the behaviour of file transfer completion detection.

This should be accounted for in 22225f7. Please let me know if it works for you.

samtrek commented 1 year ago

Fixed and what a relief, I was thinking that it was not that important, that was why I did not to report it, since the plugin itself is working. Thank you for your effort and time

hoehermann commented 1 year ago

Thank you for your assistance. Without your help, this issue would have eluded me until about Ubuntu 24.04.