summary refs log tree commit diff stats
path: root/worker/imap
diff options
context:
space:
mode:
Diffstat (limited to 'worker/imap')
-rw-r--r--worker/imap/movecopy.go16
-rw-r--r--worker/imap/worker.go2
2 files changed, 18 insertions, 0 deletions
diff --git a/worker/imap/movecopy.go b/worker/imap/movecopy.go
new file mode 100644
index 0000000..8c42a2e
--- /dev/null
+++ b/worker/imap/movecopy.go
@@ -0,0 +1,16 @@
+package imap
+
+import (
+	"git.sr.ht/~sircmpwn/aerc2/worker/types"
+)
+
+func (imapw *IMAPWorker) handleCopyMessages(msg *types.CopyMessages) {
+	if err := imapw.client.UidCopy(&msg.Uids, msg.Destination); err != nil {
+		imapw.worker.PostMessage(&types.Error{
+			Message: types.RespondTo(msg),
+			Error:   err,
+		}, nil)
+	} else {
+		imapw.worker.PostMessage(&types.Done{types.RespondTo(msg)}, nil)
+	}
+}
diff --git a/worker/imap/worker.go b/worker/imap/worker.go
index d0b0e71..1fab3bb 100644
--- a/worker/imap/worker.go
+++ b/worker/imap/worker.go
@@ -174,6 +174,8 @@ func (w *IMAPWorker) handleMessage(msg types.WorkerMessage) error {
 		w.handleFetchFullMessages(msg)
 	case *types.DeleteMessages:
 		w.handleDeleteMessages(msg)
+	case *types.CopyMessages:
+		w.handleCopyMessages(msg)
 	default:
 		return errUnsupported
 	}
='alt'>
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^


cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
cfbb8c84 ^
61de0a4d ^
9f186528 ^
61de0a4d ^
9f186528 ^
61de0a4d ^
9f186528 ^
8db3c4b1 ^
9f186528 ^
6f43de0a ^
9f186528 ^
61de0a4d ^
9f186528 ^
61de0a4d ^
9f186528 ^
61de0a4d ^
9f186528 ^
61de0a4d ^
9f186528 ^
61de0a4d ^


cfbb8c84 ^
61de0a4d ^

69a0e827 ^



61de0a4d ^


cfbb8c84 ^


61de0a4d ^

cfbb8c84 ^


61de0a4d ^



cfbb8c84 ^


61de0a4d ^



cfbb8c84 ^


61de0a4d ^

cfbb8c84 ^


61de0a4d ^


cfbb8c84 ^


61de0a4d ^


cfbb8c84 ^


61de0a4d ^


cfbb8c84 ^


61de0a4d ^

cfbb8c84 ^


61de0a4d ^

cfbb8c84 ^


61de0a4d ^



cfbb8c84 ^


61de0a4d ^



9f186528 ^


61de0a4d ^

9f186528 ^


61de0a4d ^

9f186528 ^


61de0a4d ^


9f186528 ^


61de0a4d ^

9f186528 ^


61de0a4d ^

9f186528 ^


61de0a4d ^
6f43de0a ^
9f186528 ^


69a0e827 ^









cfbb8c84 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190

         
                                             
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                  
   
                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                 
   
                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                 
   
                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                 
   
                                             
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                  
   
                                         
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                  
   
                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                  
   
                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                  
   


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
   
                                                           
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                  
   
                                                       
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                 
   
                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                  
   
                                             
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                  
   
                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                  
   
                                               
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                  
   
                                         
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                 
   


                               
   

                             



                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                


                                                             


                                     

                                                          


                                     



                                                             


                                     



                                                          


                                     

                                                             


                                     


                                                                         


                                     


                                                          


                                     


                                                          


                                     

                                                          


                                     

                                                             


                                     



                                                          


                                     



                                                             


                                     

                                                             


                                     

                                                             


                                     


                                                                         


                                     

                                                                         


                                     

                                                          


                                     
                                                          
                                      


                                     









                                                             
   
format 70

classcanvas 128002 class_ref 148738 // Action
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 151 121 2000
end
classcanvas 128130 class_ref 148866 // Command
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 212 31 2000
end
classcanvas 128258 class_ref 148994 // CommandList
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 338 18 2000
end
classcanvas 128642 class_ref 149122 // Environment
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 99 305 2000
end
classcanvas 128770 class_ref 149250 // curses
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 118 611 2000
end
classcanvas 128898 class_ref 149378 // FM
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 143 185 2000
end
classcanvas 129154 class_ref 128002 // Displayable
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 325 408 2000
end
classcanvas 129666 class_ref 135426 // Console
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 627 149 2006
end
classcanvas 129922 class_ref 128130 // UI
  draw_all_relations default hide_attributes default hide_operations yes hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 366 235 2006
end
classcanvas 130178 class_ref 128386 // DisplayableContainer
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 299 311 2012
end
classcanvas 131458 class_ref 155906 // FileSystemObject
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 71 416 2000
end
classcanvas 131842 class_ref 128258 // DefaultUI
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 325 129 2012
end
classcanvas 132610 class_ref 156034 // Widget
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 509 237 2017
end
classcanvas 133250 class_ref 135170 // BrowserColumn
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 526 453 2023
end
classcanvas 133506 class_ref 135042 // TitleBar
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 646 391 2023
end
classcanvas 136322 class_ref 162690 // os
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 54 566 2000
end
packagecanvas 136578 
  package_ref 134530 // builtin
    xyzwh 29 522 2006 225 181
end
note 137346 "\"outer world\""
  xyzwh 123 566 2011 117 37
classcanvas 137602 class_ref 175746 // Pager
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 537 333 2028
end
relationcanvas 129026 relation_ref 156162 // <generalisation>
  decenter_begin 466
  from ref 128898 z 2001 to ref 128002
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 129538 relation_ref 162946 // <aggregation>
  from ref 128258 z 2001 to ref 128130
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 130306 relation_ref 128386 // <generalisation>
  decenter_begin 441
  decenter_end 407
  from ref 130178 z 2001 to ref 129154
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 130434 relation_ref 135938 // <aggregation>
  decenter_begin 603
  decenter_end 631
  from ref 130178 z 2001 to ref 129154
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 130562 relation_ref 128258 // <generalisation>
  from ref 129922 z 2007 to ref 130178
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 130946 relation_ref 169730 // <unidirectional association>
  from ref 128130 z 2001 to point 180 56
  line 137218 z 2001 to ref 128002
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 131202 relation_ref 169986 // <association>
  decenter_begin 514
  from ref 129154 z 2001 to ref 128770
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 131586 relation_ref 170242 // <aggregation>
  decenter_begin 351
  from ref 128642 z 2001 to ref 131458
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 131714 relation_ref 170370 // <association>
  from ref 128642 z 2001 to ref 129154
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 131970 relation_ref 128002 // <generalisation>
  from ref 131842 z 2007 to ref 129922
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 132354 relation_ref 170498 // <association>
  decenter_begin 435
  decenter_end 347
  from ref 131842 z 2013 to ref 128258
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 132738 relation_ref 170754 // <generalisation>
  decenter_end 126
  from ref 132610 z 2001 to point 493 430
  line 137474 z 2001 to ref 129154
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 132866 relation_ref 170882 // <generalisation>
  from ref 129666 z 2007 to ref 132610
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 133634 relation_ref 171010 // <generalisation>
  from ref 133506 z 2018 to ref 132610
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 133762 relation_ref 177922 // <unidirectional association>
  decenter_end 569
  from ref 128898 z 2001 to ref 128642
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 135170 relation_ref 178050 // <unidirectional association>
  from ref 128898 z 2013 to ref 131842
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 136450 relation_ref 184706 // <association>
  from ref 136322 z 2001 to ref 131458
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 136834 relation_ref 170626 // <association>
  from ref 129666 z 2007 to ref 128258
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 137730 relation_ref 191234 // <generalisation>
  from ref 137602 z 2029 to ref 132610
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 137858 relation_ref 191362 // <generalisation>
  from ref 133250 z 2029 to ref 137602
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
end