]> Untitled Git - lemmy.git/blob - crates/apub/src/migrations.rs
0f18d2f376b6aad6ca05430205ab1de4ee8558ea
[lemmy.git] / crates / apub / src / migrations.rs
1 use serde::{Deserialize, Serialize};
2 use url::Url;
3
4 /// Migrate comment.in_reply_to field from containing post and parent comment ID, to only containing
5 /// the direct parent (whether its a post or comment). This is for compatibility with Pleroma and
6 /// Smithereen.
7 /// [https://github.com/LemmyNet/lemmy/issues/1454]
8 ///
9 /// v0.12: receive both, send old (compatible with v0.11)
10 /// v0.13 receive both, send new (compatible with v0.12+, incompatible with v0.11)
11 /// v0.14: only send and receive new, remove migration (compatible with v0.13+)
12 #[derive(Serialize, Deserialize, Debug, Clone)]
13 #[serde(untagged)]
14 pub enum CommentInReplyToMigration {
15   Old(Vec<Url>),
16   New(Url),
17 }