about summary refs log tree commit homepage
path: root/lib/PublicInbox/NetWriter.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/NetWriter.pm')
-rw-r--r--lib/PublicInbox/NetWriter.pm14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/PublicInbox/NetWriter.pm b/lib/PublicInbox/NetWriter.pm
index 629a752a..7917ef89 100644
--- a/lib/PublicInbox/NetWriter.pm
+++ b/lib/PublicInbox/NetWriter.pm
@@ -1,10 +1,9 @@
-# Copyright (C) 2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # common writer code for IMAP (and later, JMAP)
 package PublicInbox::NetWriter;
-use strict;
-use v5.10.1;
+use v5.12;
 use parent qw(PublicInbox::NetReader);
 use PublicInbox::Smsg;
 use PublicInbox::MsgTime qw(msg_timestamp);
@@ -56,4 +55,13 @@ sub imap_set_kw {
         $mic; # caller must ->expunge
 }
 
+sub can_store_flags {
+        my ($self, $mic) = @_;
+        for ($mic->Results) {
+                /^\* OK \[PERMANENTFLAGS \(([^\)]*)\)\].*/ and
+                        return $self->can('perm_fl_ok')->($1);
+        }
+        undef;
+}
+
 1;