From f13c60b70e1d9435b5f2803fc48c44eed7be761c Mon Sep 17 00:00:00 2001 From: Vika Date: Fri, 21 Jul 2023 17:40:32 +0300 Subject: Move MentionType into util and fix bugs in -check-webmention app --- kittybox-rs/util/src/lib.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'kittybox-rs/util') 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}; -- cgit 1.4.1