about summary refs log tree commit diff stats
path: root/worker/types
diff options
context:
space:
mode:
authorARaspiK <araspik@protonmail.com>2020-07-05 14:29:52 +0000
committerReto Brunner <reto@labrat.space>2020-07-08 09:13:03 +0200
commit0535f6333f2f5d13469fc315a65c53ff8a5e83f3 (patch)
treefa3adf96b16d4a0296c04b6a17f5433c03fbc8de /worker/types
parentfda3f43e7c5e5a175a01dd3e5b8637b1ecb30c51 (diff)
downloadaerc-0535f6333f2f5d13469fc315a65c53ff8a5e83f3.tar.gz
Add additional flagging functionality
More mail flags can now be set, unset, and toggled, not just the
read/seen flag.

This functionality is implemented with a new `:flag` and `:unflag`
command, which are extensions to the matching `:read` and `:unread`
commands, adding support for different flags.  In fact, the
`read`/`unread` commands are now recognized aliases to `flag`/`unflag`.
The new commands are also well documented in aerc(1).

The change mostly extends the previous read/unread setting functionality
by adding a selection for the flag to change.
Diffstat (limited to 'worker/types')
-rw-r--r--worker/types/messages.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/worker/types/messages.go b/worker/types/messages.go
index 475a7aa..c044667 100644
--- a/worker/types/messages.go
+++ b/worker/types/messages.go
@@ -113,10 +113,11 @@ type DeleteMessages struct {
 	Uids []uint32
 }
 
-// Marks messages as read or unread
-type ReadMessages struct {
+// Flag messages with different mail types
+type FlagMessages struct {
 	Message
-	Read bool
+	Enable bool
+	Flag models.Flag
 	Uids []uint32
 }