fix: repost ui limitation
This commit is contained in:
parent
657c204a66
commit
4837da0cba
3 changed files with 72 additions and 49 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue