Fixing post visibility patch
Co-authored-by: Laura Hausmann <laura@hausmann.dev>
This commit is contained in:
parent
34a6e1caa4
commit
455c7273ee
|
@ -462,15 +462,21 @@ if (
|
||||||
props.reply &&
|
props.reply &&
|
||||||
["home", "followers", "specified"].includes(props.reply.visibility)
|
["home", "followers", "specified"].includes(props.reply.visibility)
|
||||||
) {
|
) {
|
||||||
visibility = props.reply.visibility;
|
if (props.reply.visibility === 'home' && visibility === 'followers') {
|
||||||
if (props.reply.visibility === "specified") {
|
visibility = 'followers';
|
||||||
os.api("users/show", {
|
} else if (['home', 'followers'].includes(props.reply.visibility) && visibility === 'specified') {
|
||||||
userIds: props.reply.visibleUserIds.filter(
|
visibility = 'specified';
|
||||||
(uid) => uid !== $i.id && uid !== props.reply.userId
|
} else {
|
||||||
),
|
visibility = props.reply.visibility;
|
||||||
}).then((users) => {
|
}
|
||||||
users.forEach(pushVisibleUser);
|
if (visibility === 'specified') {
|
||||||
});
|
if (props.reply.visibleUserIds) {
|
||||||
|
os.api('users/show', {
|
||||||
|
userIds: props.reply.visibleUserIds.filter(uid => uid !== $i.id && uid !== props.reply.userId),
|
||||||
|
}).then(users => {
|
||||||
|
users.forEach(pushVisibleUser);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (props.reply.userId !== $i.id) {
|
if (props.reply.userId !== $i.id) {
|
||||||
os.api("users/show", { userId: props.reply.userId }).then(
|
os.api("users/show", { userId: props.reply.userId }).then(
|
||||||
|
|
Loading…
Reference in New Issue