feat: add v0.19.0 support

This commit is contained in:
Xyphyn committed 2023-09-28 17:09:09 -07:00
1 parent b3b8a10e44
commit 119ab53946
62 files changed
+188 -157

No files matched your search

@@ -62,7 +62,6 @@
if (community) {
await getClient().banFromCommunity({
auth: $profile.jwt,
ban: !banned,
community_id: community.id,
person_id: item.id,
@@ -72,7 +71,6 @@
})
} else {
await getClient().banPerson({
auth: $profile.jwt,
ban: !banned,
person_id: item.id,
reason: reason || undefined,
@@ -29,7 +29,6 @@
try {
await getClient().lockPost({
auth: $profile.jwt,
locked: lock,
post_id: item.post.id,
})
@@ -60,7 +59,6 @@
try {
await getClient().featurePost({
feature_type: toInstance ? 'Local' : 'Community',
auth: $profile.jwt,
featured: pinned,
post_id: item.post.id,
})
@@ -57,13 +57,11 @@
if (purge) {
if (isCommentView(item)) {
await getClient(undefined, fetch).purgeComment({
auth: $profile.jwt,
comment_id: item.comment.id,
reason: reason,
})
} else {
await getClient(undefined, fetch).purgePost({
auth: $profile.jwt,
post_id: item.post.id,
reason: reason,
})
@@ -91,7 +89,6 @@
if (privateMessage) {
await getClient()
.createPrivateMessage({
auth: $profile.jwt,
content: replyReason,
recipient_id: isCommentView(item)
? item.comment.creator_id
@@ -106,7 +103,6 @@
} else {
await getClient()
.createComment({
auth: $profile.jwt,
content: replyReason,
post_id: item.post.id,
parent_id: isCommentView(item) ? item.comment.id : undefined,
@@ -122,7 +118,6 @@
if (isCommentView(item)) {
await getClient().removeComment({
auth: $profile.jwt,
comment_id: item.comment.id,
removed: !removed,
reason: reason || undefined,
@@ -130,7 +125,6 @@
item.comment.removed = !removed
} else if (isPostView(item)) {
await getClient().removePost({
auth: $profile.jwt,
post_id: item.post.id,
removed: !removed,
reason: reason || undefined,
@@ -27,13 +27,11 @@
try {
if (isComment(item)) {
await getClient().createCommentReport({
auth: $profile.jwt,
comment_id: item.comment.id,
reason: reason,
})
} else if (isPost(item)) {
await getClient().createPostReport({
auth: $profile.jwt,
post_id: item.post.id,
reason: reason,
})
@@ -78,7 +78,7 @@ export const amMod = (me: MyUserInfo, community: Community) =>
export const amModOfAny = (me?: MyUserInfo) =>
me && (me.moderates.length > 0 || isAdmin(me))
export const isAdmin = (me: MyUserInfo) => me.local_user_view.person.admin
export const isAdmin = (me: MyUserInfo) => me.local_user_view.local_user.admin
export const removalTemplate = (
input: string,