summaryrefslogtreecommitdiff
path: root/lib/message
diff options
context:
space:
mode:
authorDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2025-09-03 19:36:35 +0300
committerDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2025-09-03 19:36:35 +0300
commite896eae433d078ce079e702cce040bba38199dad (patch)
tree05e9018bd3e4a3d43128e4ddfd8fcf202639ab76 /lib/message
parente64a48a08575fb9c456f9fe5717ef42770aafbcb (diff)
store: remove some _unlocked functions, update clear_labels
They don't add much value, let's remove. Rework clear_labels in terms of update_labels.
Diffstat (limited to 'lib/message')
-rw-r--r--lib/message/mu-message.hh20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/message/mu-message.hh b/lib/message/mu-message.hh
index 0202558..065ad5c 100644
--- a/lib/message/mu-message.hh
+++ b/lib/message/mu-message.hh
@@ -319,6 +319,26 @@ public:
size_t size() const { return static_cast<size_t>(document().integer_value(Field::Id::Size)); }
/**
+ * Get the Xapian term for some message path (static function)
+ *
+ * @param path the path
+ *
+ * @return the xapian term
+ */
+ static std::string xapian_term(const std::string& path) {
+ return field_from_id(Field::Id::Path).xapian_term(path);
+ }
+
+ /**
+ * Get the Xapian term for this message
+ *
+ * @return the xapian term
+ */
+ std::string xapian_term() const {
+ return xapian_term(path());
+ }
+
+ /**
* Get the (possibly empty) list of references (consisting of both the
* References and In-Reply-To fields), with the oldest first and the
* direct parent as the last one. Note, any reference (message-id) will