tomer8007 / whatsapp-web-incognito

A Chrome extension that disables read receipts and presence updates on WhatsApp Web
MIT License
312 stars 74 forks source link

Add view once viewing #153

Closed IsaacHatton closed 6 months ago

IsaacHatton commented 6 months ago

This adds view once viewing functionality, note that none of the security/only view once functionality is present. Also, the image/video cannot be enlarged into the main viewer like other images/videos. image

IsaacHatton commented 6 months ago

This fixes issue #128

tomer8007 commented 6 months ago

Do you want to also mark the restored message in red, similarly to deleted messages?

IsaacHatton commented 6 months ago

I could as long as you think the view once logo will be enough for people to understand that it's a view once rather than a deleted normal message?

tomer8007 commented 6 months ago

Can you post a screenshot of how the view once message usually looks like after you've already viewed it?

IsaacHatton commented 6 months ago

It doesn't change how it looks, my code never deletes the image once its viewed, the images are viewable unlimited times

tomer8007 commented 6 months ago

I meant how does the user see a view-once message he's already viewed, without any modifications (the natural way)

IsaacHatton commented 6 months ago

Do you want it to enforce view once?

tomer8007 commented 6 months ago

No, I was just wondering if it'll be clear to the user that the extension is enabling him to view the message twice even though it's a view-once message

IsaacHatton commented 6 months ago

IIRC the web has no change once a view once is opened on mobile, it always displays the default text about only viewable on mobile.

tomer8007 commented 6 months ago

Oh I understand. So with the extension on, you will see view-once messages in the web, and you could view them unlimited times. Correct?

IsaacHatton commented 6 months ago

Yes, this is the functionality without this (chrome ext from store version) image

tomer8007 commented 6 months ago

Finally, is everything working?

IsaacHatton commented 6 months ago

As far as I can tell, but I'm not confident with how the IndexedDB will behave when it has to create the database as I havent used indexedDB before.

tomer8007 commented 6 months ago

I think it'll work, but you can just delete the IndexedDB / uninstall the extension and install it again to see.

IsaacHatton commented 6 months ago

I did that but my concern is that what happens if it gets created by the injection script as in my test account it always is created by UI because there are view once messages in the chat history.

tomer8007 commented 6 months ago

I don't understand why you can't check the injection script flow.

IsaacHatton commented 6 months ago

Apologies, my earlier comment was incorrect, I just tested the injection script flow by sending myself before opening any chats, and it worked fine.

I forgot that the UI script would only run once a chat was opened, as there aren't any messages to check on the first screen (the one that recommends downloading the desktop app).

tomer8007 commented 6 months ago

OK, Thank you for this pull request, your time is appreciated

IsaacHatton commented 6 months ago

Did you want the text added, if not don't worry: image

tomer8007 commented 6 months ago

I think it's a good text, you can have another pull request for it