Smarter scope copy #28

Merged
floatingghost merged 2 commits from nbsp/pleroma-fe:smart-scope into develop 2022-07-12 09:04:29 +00:00
Contributor

currently, if scope copy is enabled, replies to posts will always copy the OP's scope, even if the preferred default scope is more restricted
likewise, if it is disabled, posts may be replied to with a more open visibility than intended.

with this patch, here is what the scope of a reply would look like with scope copy on:

preferred scope op scope result
* direct direct
private * private (except for direct)
unlisted public unlisted
unlisted unlisted unlisted
unlisted private private
public * (always copies scope)
currently, if scope copy is enabled, replies to posts will *always* copy the OP's scope, even if the preferred default scope is more restricted likewise, if it is disabled, posts may be replied to with a more open visibility than intended. with this patch, here is what the scope of a reply would look like with scope copy on: | preferred scope | op scope | result | | -------- | -------- | -------- | | * | direct | direct | | private | * | private (except for direct) | | unlisted | public | unlisted | | unlisted | unlisted | unlisted | | unlisted | private | private | | public | * | (always copies scope)
nbsp added 1 commit 2022-07-07 17:00:15 +00:00
ci/woodpecker/pr/woodpecker Pipeline was successful Details
7af3ef4913
Smarter scope copy
Author
Contributor

for clarity this is what shows up automatically when clicking 'reply', of course you can change all of this with a simple click, it's just that i often find myself not realizing i'm on the wrong scope until it's too late

for clarity this is what shows up automatically when clicking 'reply', of course you can change all of this with a simple click, it's just that i often find myself not realizing i'm on the wrong scope until it's too late
floatingghost reviewed 2022-07-10 17:10:43 +00:00
@ -120,3 +120,3 @@
}
const scope = ((this.copyMessageScope && scopeCopy) || this.copyMessageScope === 'direct')
const scope = (this.copyMessageScope && (

i'm not the biggest fan of this long ternary, it's really not easy to figure out

any chance you could extract this to a function(default_scope, post_scope) and lay it out a bit more formally?

i'm not the biggest fan of this long ternary, it's really not easy to figure out any chance you could extract this to a `function(default_scope, post_scope)` and lay it out a bit more formally?
nbsp added 1 commit 2022-07-11 09:01:48 +00:00
ci/woodpecker/pr/woodpecker Pipeline was successful Details
cf8324c6c5
Move scope logic to function

ah that's far easier to read, thank

ah that's far easier to read, thank
floatingghost merged commit 5385797ff1 into develop 2022-07-12 09:04:29 +00:00
nbsp deleted branch smart-scope 2022-07-12 10:56:24 +00:00
Beefox referenced this issue from a commit 2022-07-27 07:00:24 +00:00
Beefox referenced this issue from a commit 2022-09-22 00:57:33 +00:00
Sign in to join this conversation.
No description provided.