fix: repost ui limitation

This commit is contained in:
trisua 2025-05-17 22:12:29 -04:00
parent 657c204a66
commit 4837da0cba
3 changed files with 72 additions and 49 deletions

View file

@ -1007,21 +1007,25 @@ impl DataManager {
};
if let Some(ref rt) = reposting {
data.context.reposts_enabled = false; // cannot repost reposts
if data.content.is_empty() {
// reposting but NOT quoting... we shouldn't be able to repost a direct repost
data.context.reposts_enabled = false;
data.context.reactions_enabled = false;
}
// mirror nsfw status
if rt.context.is_nsfw {
data.context.is_nsfw = true;
}
// make sure we aren't trying to repost a repost
if if let Some(ref repost) = rt.context.repost {
repost.reposting.is_some()
} else {
false
} {
return Err(Error::MiscError("Cannot repost a repost".to_string()));
}
// // make sure we aren't trying to repost a repost
// if if let Some(ref repost) = rt.context.repost {
// repost.reposting.is_some()
// } else {
// false
// } {
// return Err(Error::MiscError("Cannot repost a repost".to_string()));
// }
// ...
if !rt.context.reposts_enabled {