about summary refs log tree commit diff
path: root/kittybox-rs/util/src
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2023-07-21 17:40:32 +0300
committerVika <vika@fireburn.ru>2023-07-21 17:40:32 +0300
commitf13c60b70e1d9435b5f2803fc48c44eed7be761c (patch)
tree16894e3116e85155797a752237a69bd0872db25f /kittybox-rs/util/src
parent94ebc5e653191fcaacfa91dddebf88dca7e7b7fe (diff)
downloadkittybox-f13c60b70e1d9435b5f2803fc48c44eed7be761c.tar.zst
Move MentionType into util and fix bugs in -check-webmention app
Diffstat (limited to 'kittybox-rs/util/src')
-rw-r--r--kittybox-rs/util/src/lib.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/kittybox-rs/util/src/lib.rs b/kittybox-rs/util/src/lib.rs
index 617ee97..c49bdf5 100644
--- a/kittybox-rs/util/src/lib.rs
+++ b/kittybox-rs/util/src/lib.rs
@@ -24,6 +24,22 @@ pub struct MicropubChannel {
     pub name: String,
 }
 
+#[derive(Debug, Default)]
+/// Common types of webmentions.
+pub enum MentionType {
+    /// Corresponds to a `u-in-reply-to` link.
+    Reply,
+    /// Corresponds to a `u-like-of` link.
+    Like,
+    /// Corresponds to a `u-repost-of` link.
+    Repost,
+    /// Corresponds to a `u-bookmark-of` link.
+    Bookmark,
+    /// A plain link without MF2 annotations.
+    #[default]
+    Mention
+}
+
 /// Common errors from the IndieWeb protocols that can be reused between modules.
 pub mod error;
 pub use error::{ErrorType, MicropubError};