Commit graph

5 commits

Author SHA1 Message Date
Reto Brunner
c574a838fa Remove hard coded bodystruct path everywhere
Aerc usually used the path []int{1} if it didn't know what the proper path is.
However this only works for multipart messages and breaks if it isn't one.

This patch removes all the hard coding and extracts the necessary helpers to lib.
2020-07-27 09:19:27 +02:00
Reto Brunner
d48ea6231c Move findPlaintext / findFirstNonMultipart to utils
They are used by more than one command and as such need to be in a common file.
2020-05-17 12:15:50 +02:00
Reto Brunner
ea2646fc03 Change MarkedMessages to return uids
Especially if one tries to interact with all marked messages there could be
the case that not all headers are fetched yet, hence the messageInfo is still nil.

This segfaults a lot of commands which in principle only need the uid to complete.

If we switch to uids, this issue can be alleviated for those commands.
2020-05-11 09:47:34 -04:00
Reto Brunner
381c1fc05f commands/helper: remove duplicated method 2020-05-11 09:47:33 -04:00
Reto Brunner
881a9081a8 add command helpers 2019-12-21 09:27:50 -05:00