diff options
author | Vika <vika@fireburn.ru> | 2023-07-21 17:40:32 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2023-07-21 17:40:32 +0300 |
commit | f13c60b70e1d9435b5f2803fc48c44eed7be761c (patch) | |
tree | 16894e3116e85155797a752237a69bd0872db25f /kittybox-rs/util | |
parent | 94ebc5e653191fcaacfa91dddebf88dca7e7b7fe (diff) | |
download | kittybox-f13c60b70e1d9435b5f2803fc48c44eed7be761c.tar.zst |
Move MentionType into util and fix bugs in -check-webmention app
Diffstat (limited to 'kittybox-rs/util')
-rw-r--r-- | kittybox-rs/util/src/lib.rs | 16 |
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}; |