squatto / alfred-imessage-2fa

iMessage 2FA Workflow for Alfred
MIT License
111 stars 7 forks source link

[feature] Option to mark message as read #30

Open dipakparmar opened 2 years ago

dipakparmar commented 2 years ago

It would be nice to mark the selected message as read after copying it to the clipboard. Can be turned on or off with env. variable.

dipakparmar commented 2 years ago

something like this ...

$strdate = strtotime( date( 'Y-m-d H:i:s' ) );
$markedread = $db->query( 'update message SET is_read = 1, date_read = ' . $strdate . ' where ROWID = ' . $rowid )->fetch( PDO::FETCH_ASSOC );
thebitguru commented 2 years ago

Will this mark it as read on all devices, or just the current computer?

dipakparmar commented 2 years ago

Currently don’t remember as haven't had time to add that to the PHP script, but as long iMessage sync is enabled, it should mark it read on all of the devices. (haven't confirmed the sync)

madmaximux commented 2 years ago

I would love to have this feature as well.

PS. I could test this out for you, just need to know how to grab the rowid and also what line to put this in.

dipakparmar commented 2 years ago

@madmaximux you can access the ROWID from the message table eg. message.rowid see code in find-messages.php

https://github.com/squatto/alfred-imessage-2fa/blob/789070f81ccb482e1d476720d75e98d94fc63e4a/find-messages.php#L43-L76

AnKingMed commented 3 months ago

I'd love to have this feature too!

thebitguru commented 2 months ago

Thanks for the request, @AnKingMed. I will see what I can do in the week or so.

AnKingMed commented 2 months ago

Awesome thank you! Happy to test if you need a tester