mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-24 23:30:56 +00:00
Update prettier to 3.0.0 (#3509)
* Update prettier to 3.0.0 * Updating prettier dep. * Explicity 3.0.0 version.
This commit is contained in:
parent
22cdcc6b60
commit
2a088cf023
|
@ -23,7 +23,7 @@ pipeline:
|
||||||
- git submodule update
|
- git submodule update
|
||||||
|
|
||||||
prettier_check:
|
prettier_check:
|
||||||
image: tmknom/prettier:2.8.8
|
image: tmknom/prettier:3.0.0
|
||||||
commands:
|
commands:
|
||||||
- prettier -c . '!**/volumes' '!**/dist' '!target' '!**/translations'
|
- prettier -c . '!**/volumes' '!**/dist' '!target' '!**/translations'
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
"eslint-plugin-prettier": "^4.0.0",
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
"jest": "^29.5.0",
|
"jest": "^29.5.0",
|
||||||
"lemmy-js-client": "0.17.2-rc.13",
|
"lemmy-js-client": "0.17.2-rc.13",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^3.0.0",
|
||||||
"ts-jest": "^29.1.0",
|
"ts-jest": "^29.1.0",
|
||||||
"typescript": "^5.0.4"
|
"typescript": "^5.0.4"
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ afterAll(async () => {
|
||||||
|
|
||||||
function assertCommentFederation(
|
function assertCommentFederation(
|
||||||
commentOne?: CommentView,
|
commentOne?: CommentView,
|
||||||
commentTwo?: CommentView
|
commentTwo?: CommentView,
|
||||||
) {
|
) {
|
||||||
expect(commentOne?.comment.ap_id).toBe(commentTwo?.comment.ap_id);
|
expect(commentOne?.comment.ap_id).toBe(commentTwo?.comment.ap_id);
|
||||||
expect(commentOne?.comment.content).toBe(commentTwo?.comment.content);
|
expect(commentOne?.comment.content).toBe(commentTwo?.comment.content);
|
||||||
|
@ -96,10 +96,10 @@ test("Update a comment", async () => {
|
||||||
|
|
||||||
let updateCommentRes = await editComment(
|
let updateCommentRes = await editComment(
|
||||||
alpha,
|
alpha,
|
||||||
commentRes.comment_view.comment.id
|
commentRes.comment_view.comment.id,
|
||||||
);
|
);
|
||||||
expect(updateCommentRes.comment_view.comment.content).toBe(
|
expect(updateCommentRes.comment_view.comment.content).toBe(
|
||||||
"A jest test federated comment update"
|
"A jest test federated comment update",
|
||||||
);
|
);
|
||||||
expect(updateCommentRes.comment_view.community.local).toBe(false);
|
expect(updateCommentRes.comment_view.community.local).toBe(false);
|
||||||
expect(updateCommentRes.comment_view.creator.local).toBe(true);
|
expect(updateCommentRes.comment_view.creator.local).toBe(true);
|
||||||
|
@ -117,21 +117,21 @@ test("Delete a comment", async () => {
|
||||||
let deleteCommentRes = await deleteComment(
|
let deleteCommentRes = await deleteComment(
|
||||||
alpha,
|
alpha,
|
||||||
true,
|
true,
|
||||||
commentRes.comment_view.comment.id
|
commentRes.comment_view.comment.id,
|
||||||
);
|
);
|
||||||
expect(deleteCommentRes.comment_view.comment.deleted).toBe(true);
|
expect(deleteCommentRes.comment_view.comment.deleted).toBe(true);
|
||||||
|
|
||||||
// Make sure that comment is undefined on beta
|
// Make sure that comment is undefined on beta
|
||||||
let betaCommentRes = (await resolveComment(
|
let betaCommentRes = (await resolveComment(
|
||||||
beta,
|
beta,
|
||||||
commentRes.comment_view.comment
|
commentRes.comment_view.comment,
|
||||||
)) as any;
|
)) as any;
|
||||||
expect(betaCommentRes.error).toBe("couldnt_find_object");
|
expect(betaCommentRes.error).toBe("couldnt_find_object");
|
||||||
|
|
||||||
let undeleteCommentRes = await deleteComment(
|
let undeleteCommentRes = await deleteComment(
|
||||||
alpha,
|
alpha,
|
||||||
false,
|
false,
|
||||||
commentRes.comment_view.comment.id
|
commentRes.comment_view.comment.id,
|
||||||
);
|
);
|
||||||
expect(undeleteCommentRes.comment_view.comment.deleted).toBe(false);
|
expect(undeleteCommentRes.comment_view.comment.deleted).toBe(false);
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ test("Remove a comment from admin and community on the same instance", async ()
|
||||||
// Make sure that comment is removed on alpha (it gets pushed since an admin from beta removed it)
|
// Make sure that comment is removed on alpha (it gets pushed since an admin from beta removed it)
|
||||||
let refetchedPostComments = await getComments(
|
let refetchedPostComments = await getComments(
|
||||||
alpha,
|
alpha,
|
||||||
postRes.post_view.post.id
|
postRes.post_view.post.id,
|
||||||
);
|
);
|
||||||
expect(refetchedPostComments.comments[0].comment.removed).toBe(true);
|
expect(refetchedPostComments.comments[0].comment.removed).toBe(true);
|
||||||
|
|
||||||
|
@ -172,12 +172,12 @@ test("Remove a comment from admin and community on the same instance", async ()
|
||||||
// Make sure that comment is unremoved on beta
|
// Make sure that comment is unremoved on beta
|
||||||
let refetchedPostComments2 = await getComments(
|
let refetchedPostComments2 = await getComments(
|
||||||
alpha,
|
alpha,
|
||||||
postRes.post_view.post.id
|
postRes.post_view.post.id,
|
||||||
);
|
);
|
||||||
expect(refetchedPostComments2.comments[0].comment.removed).toBe(false);
|
expect(refetchedPostComments2.comments[0].comment.removed).toBe(false);
|
||||||
assertCommentFederation(
|
assertCommentFederation(
|
||||||
refetchedPostComments2.comments[0],
|
refetchedPostComments2.comments[0],
|
||||||
unremoveCommentRes.comment_view
|
unremoveCommentRes.comment_view,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ test("Remove a comment from admin and community on different instance", async ()
|
||||||
let newCommunity = await createCommunity(newAlphaApi);
|
let newCommunity = await createCommunity(newAlphaApi);
|
||||||
let newPost = await createPost(
|
let newPost = await createPost(
|
||||||
newAlphaApi,
|
newAlphaApi,
|
||||||
newCommunity.community_view.community.id
|
newCommunity.community_view.community.id,
|
||||||
);
|
);
|
||||||
let commentRes = await createComment(newAlphaApi, newPost.post_view.post.id);
|
let commentRes = await createComment(newAlphaApi, newPost.post_view.post.id);
|
||||||
expect(commentRes.comment_view.comment.content).toBeDefined();
|
expect(commentRes.comment_view.comment.content).toBeDefined();
|
||||||
|
@ -209,19 +209,19 @@ test("Remove a comment from admin and community on different instance", async ()
|
||||||
let removeCommentRes = await removeComment(
|
let removeCommentRes = await removeComment(
|
||||||
beta,
|
beta,
|
||||||
true,
|
true,
|
||||||
betaComment.comment.id
|
betaComment.comment.id,
|
||||||
);
|
);
|
||||||
expect(removeCommentRes.comment_view.comment.removed).toBe(true);
|
expect(removeCommentRes.comment_view.comment.removed).toBe(true);
|
||||||
|
|
||||||
// Make sure its not removed on alpha
|
// Make sure its not removed on alpha
|
||||||
let refetchedPostComments = await getComments(
|
let refetchedPostComments = await getComments(
|
||||||
alpha,
|
alpha,
|
||||||
newPost.post_view.post.id
|
newPost.post_view.post.id,
|
||||||
);
|
);
|
||||||
expect(refetchedPostComments.comments[0].comment.removed).toBe(false);
|
expect(refetchedPostComments.comments[0].comment.removed).toBe(false);
|
||||||
assertCommentFederation(
|
assertCommentFederation(
|
||||||
refetchedPostComments.comments[0],
|
refetchedPostComments.comments[0],
|
||||||
commentRes.comment_view
|
commentRes.comment_view,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -277,13 +277,13 @@ test("Reply to a comment", async () => {
|
||||||
let replyRes = await createComment(
|
let replyRes = await createComment(
|
||||||
beta,
|
beta,
|
||||||
betaComment.post.id,
|
betaComment.post.id,
|
||||||
betaComment.comment.id
|
betaComment.comment.id,
|
||||||
);
|
);
|
||||||
expect(replyRes.comment_view.comment.content).toBeDefined();
|
expect(replyRes.comment_view.comment.content).toBeDefined();
|
||||||
expect(replyRes.comment_view.community.local).toBe(true);
|
expect(replyRes.comment_view.community.local).toBe(true);
|
||||||
expect(replyRes.comment_view.creator.local).toBe(true);
|
expect(replyRes.comment_view.creator.local).toBe(true);
|
||||||
expect(getCommentParentId(replyRes.comment_view.comment)).toBe(
|
expect(getCommentParentId(replyRes.comment_view.comment)).toBe(
|
||||||
betaComment.comment.id
|
betaComment.comment.id,
|
||||||
);
|
);
|
||||||
expect(replyRes.comment_view.counts.score).toBe(1);
|
expect(replyRes.comment_view.counts.score).toBe(1);
|
||||||
|
|
||||||
|
@ -295,7 +295,7 @@ test("Reply to a comment", async () => {
|
||||||
let alphaComment = postComments.comments[0];
|
let alphaComment = postComments.comments[0];
|
||||||
expect(alphaComment.comment.content).toBeDefined();
|
expect(alphaComment.comment.content).toBeDefined();
|
||||||
expect(getCommentParentId(alphaComment.comment)).toBe(
|
expect(getCommentParentId(alphaComment.comment)).toBe(
|
||||||
postComments.comments[1].comment.id
|
postComments.comments[1].comment.id,
|
||||||
);
|
);
|
||||||
expect(alphaComment.community.local).toBe(false);
|
expect(alphaComment.community.local).toBe(false);
|
||||||
expect(alphaComment.creator.local).toBe(false);
|
expect(alphaComment.creator.local).toBe(false);
|
||||||
|
@ -311,7 +311,7 @@ test("Mention beta", async () => {
|
||||||
alpha,
|
alpha,
|
||||||
postRes.post_view.post.id,
|
postRes.post_view.post.id,
|
||||||
commentRes.comment_view.comment.id,
|
commentRes.comment_view.comment.id,
|
||||||
mentionContent
|
mentionContent,
|
||||||
);
|
);
|
||||||
expect(mentionRes.comment_view.comment.content).toBeDefined();
|
expect(mentionRes.comment_view.comment.content).toBeDefined();
|
||||||
expect(mentionRes.comment_view.community.local).toBe(false);
|
expect(mentionRes.comment_view.community.local).toBe(false);
|
||||||
|
@ -358,7 +358,7 @@ test("A and G subscribe to B (center) A posts, G mentions B, it gets announced t
|
||||||
gamma,
|
gamma,
|
||||||
gammaPost.post.id,
|
gammaPost.post.id,
|
||||||
undefined,
|
undefined,
|
||||||
commentContent
|
commentContent,
|
||||||
);
|
);
|
||||||
expect(commentRes.comment_view.comment.content).toBe(commentContent);
|
expect(commentRes.comment_view.comment.content).toBe(commentContent);
|
||||||
expect(commentRes.comment_view.community.local).toBe(false);
|
expect(commentRes.comment_view.community.local).toBe(false);
|
||||||
|
@ -368,7 +368,7 @@ test("A and G subscribe to B (center) A posts, G mentions B, it gets announced t
|
||||||
// Make sure alpha sees it
|
// Make sure alpha sees it
|
||||||
let alphaPostComments2 = await getComments(
|
let alphaPostComments2 = await getComments(
|
||||||
alpha,
|
alpha,
|
||||||
alphaPost.post_view.post.id
|
alphaPost.post_view.post.id,
|
||||||
);
|
);
|
||||||
expect(alphaPostComments2.comments[0].comment.content).toBe(commentContent);
|
expect(alphaPostComments2.comments[0].comment.content).toBe(commentContent);
|
||||||
expect(alphaPostComments2.comments[0].community.local).toBe(true);
|
expect(alphaPostComments2.comments[0].community.local).toBe(true);
|
||||||
|
@ -376,7 +376,7 @@ test("A and G subscribe to B (center) A posts, G mentions B, it gets announced t
|
||||||
expect(alphaPostComments2.comments[0].counts.score).toBe(1);
|
expect(alphaPostComments2.comments[0].counts.score).toBe(1);
|
||||||
assertCommentFederation(
|
assertCommentFederation(
|
||||||
alphaPostComments2.comments[0],
|
alphaPostComments2.comments[0],
|
||||||
commentRes.comment_view
|
commentRes.comment_view,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Make sure beta has mentions
|
// Make sure beta has mentions
|
||||||
|
@ -421,7 +421,7 @@ test("Check that activity from another instance is sent to third instance", asyn
|
||||||
gamma,
|
gamma,
|
||||||
gammaPost.post.id,
|
gammaPost.post.id,
|
||||||
undefined,
|
undefined,
|
||||||
commentContent
|
commentContent,
|
||||||
);
|
);
|
||||||
expect(commentRes.comment_view.comment.content).toBe(commentContent);
|
expect(commentRes.comment_view.comment.content).toBe(commentContent);
|
||||||
expect(commentRes.comment_view.community.local).toBe(false);
|
expect(commentRes.comment_view.community.local).toBe(false);
|
||||||
|
@ -436,7 +436,7 @@ test("Check that activity from another instance is sent to third instance", asyn
|
||||||
expect(alphaPostComments2.comments[0].counts.score).toBe(1);
|
expect(alphaPostComments2.comments[0].counts.score).toBe(1);
|
||||||
assertCommentFederation(
|
assertCommentFederation(
|
||||||
alphaPostComments2.comments[0],
|
alphaPostComments2.comments[0],
|
||||||
commentRes.comment_view
|
commentRes.comment_view,
|
||||||
);
|
);
|
||||||
|
|
||||||
await unfollowRemotes(alpha);
|
await unfollowRemotes(alpha);
|
||||||
|
@ -447,7 +447,7 @@ test("Fetch in_reply_tos: A is unsubbed from B, B makes a post, and some embedde
|
||||||
// Unfollow all remote communities
|
// Unfollow all remote communities
|
||||||
let site = await unfollowRemotes(alpha);
|
let site = await unfollowRemotes(alpha);
|
||||||
expect(
|
expect(
|
||||||
site.my_user?.follows.filter(c => c.community.local == false).length
|
site.my_user?.follows.filter(c => c.community.local == false).length,
|
||||||
).toBe(0);
|
).toBe(0);
|
||||||
|
|
||||||
// B creates a post, and two comments, should be invisible to A
|
// B creates a post, and two comments, should be invisible to A
|
||||||
|
@ -459,10 +459,10 @@ test("Fetch in_reply_tos: A is unsubbed from B, B makes a post, and some embedde
|
||||||
beta,
|
beta,
|
||||||
postRes.post_view.post.id,
|
postRes.post_view.post.id,
|
||||||
undefined,
|
undefined,
|
||||||
parentCommentContent
|
parentCommentContent,
|
||||||
);
|
);
|
||||||
expect(parentCommentRes.comment_view.comment.content).toBe(
|
expect(parentCommentRes.comment_view.comment.content).toBe(
|
||||||
parentCommentContent
|
parentCommentContent,
|
||||||
);
|
);
|
||||||
|
|
||||||
// B creates a comment, then a child one of that.
|
// B creates a comment, then a child one of that.
|
||||||
|
@ -471,10 +471,10 @@ test("Fetch in_reply_tos: A is unsubbed from B, B makes a post, and some embedde
|
||||||
beta,
|
beta,
|
||||||
postRes.post_view.post.id,
|
postRes.post_view.post.id,
|
||||||
parentCommentRes.comment_view.comment.id,
|
parentCommentRes.comment_view.comment.id,
|
||||||
childCommentContent
|
childCommentContent,
|
||||||
);
|
);
|
||||||
expect(childCommentRes.comment_view.comment.content).toBe(
|
expect(childCommentRes.comment_view.comment.content).toBe(
|
||||||
childCommentContent
|
childCommentContent,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Follow beta again
|
// Follow beta again
|
||||||
|
@ -487,7 +487,7 @@ test("Fetch in_reply_tos: A is unsubbed from B, B makes a post, and some embedde
|
||||||
let updateRes = await editComment(
|
let updateRes = await editComment(
|
||||||
beta,
|
beta,
|
||||||
childCommentRes.comment_view.comment.id,
|
childCommentRes.comment_view.comment.id,
|
||||||
updatedCommentContent
|
updatedCommentContent,
|
||||||
);
|
);
|
||||||
expect(updateRes.comment_view.comment.content).toBe(updatedCommentContent);
|
expect(updateRes.comment_view.comment.content).toBe(updatedCommentContent);
|
||||||
|
|
||||||
|
@ -502,11 +502,11 @@ test("Fetch in_reply_tos: A is unsubbed from B, B makes a post, and some embedde
|
||||||
expect(alphaPost.post_view.post.name).toBeDefined();
|
expect(alphaPost.post_view.post.name).toBeDefined();
|
||||||
assertCommentFederation(
|
assertCommentFederation(
|
||||||
alphaPostComments.comments[1],
|
alphaPostComments.comments[1],
|
||||||
parentCommentRes.comment_view
|
parentCommentRes.comment_view,
|
||||||
);
|
);
|
||||||
assertCommentFederation(
|
assertCommentFederation(
|
||||||
alphaPostComments.comments[0],
|
alphaPostComments.comments[0],
|
||||||
updateRes.comment_view
|
updateRes.comment_view,
|
||||||
);
|
);
|
||||||
expect(alphaPost.post_view.community.local).toBe(false);
|
expect(alphaPost.post_view.community.local).toBe(false);
|
||||||
expect(alphaPost.post_view.creator.local).toBe(false);
|
expect(alphaPost.post_view.creator.local).toBe(false);
|
||||||
|
@ -539,7 +539,7 @@ test("Report a comment", async () => {
|
||||||
expect(betaReport).toBeDefined();
|
expect(betaReport).toBeDefined();
|
||||||
expect(betaReport.resolved).toBe(false);
|
expect(betaReport.resolved).toBe(false);
|
||||||
expect(betaReport.original_comment_text).toBe(
|
expect(betaReport.original_comment_text).toBe(
|
||||||
alphaReport.original_comment_text
|
alphaReport.original_comment_text,
|
||||||
);
|
);
|
||||||
expect(betaReport.reason).toBe(alphaReport.reason);
|
expect(betaReport.reason).toBe(alphaReport.reason);
|
||||||
});
|
});
|
||||||
|
|
|
@ -26,20 +26,20 @@ beforeAll(async () => {
|
||||||
|
|
||||||
function assertCommunityFederation(
|
function assertCommunityFederation(
|
||||||
communityOne?: CommunityView,
|
communityOne?: CommunityView,
|
||||||
communityTwo?: CommunityView
|
communityTwo?: CommunityView,
|
||||||
) {
|
) {
|
||||||
expect(communityOne?.community.actor_id).toBe(
|
expect(communityOne?.community.actor_id).toBe(
|
||||||
communityTwo?.community.actor_id
|
communityTwo?.community.actor_id,
|
||||||
);
|
);
|
||||||
expect(communityOne?.community.name).toBe(communityTwo?.community.name);
|
expect(communityOne?.community.name).toBe(communityTwo?.community.name);
|
||||||
expect(communityOne?.community.title).toBe(communityTwo?.community.title);
|
expect(communityOne?.community.title).toBe(communityTwo?.community.title);
|
||||||
expect(communityOne?.community.description).toBe(
|
expect(communityOne?.community.description).toBe(
|
||||||
communityTwo?.community.description
|
communityTwo?.community.description,
|
||||||
);
|
);
|
||||||
expect(communityOne?.community.icon).toBe(communityTwo?.community.icon);
|
expect(communityOne?.community.icon).toBe(communityTwo?.community.icon);
|
||||||
expect(communityOne?.community.banner).toBe(communityTwo?.community.banner);
|
expect(communityOne?.community.banner).toBe(communityTwo?.community.banner);
|
||||||
expect(communityOne?.community.published).toBe(
|
expect(communityOne?.community.published).toBe(
|
||||||
communityTwo?.community.published
|
communityTwo?.community.published,
|
||||||
);
|
);
|
||||||
expect(communityOne?.community.nsfw).toBe(communityTwo?.community.nsfw);
|
expect(communityOne?.community.nsfw).toBe(communityTwo?.community.nsfw);
|
||||||
expect(communityOne?.community.removed).toBe(communityTwo?.community.removed);
|
expect(communityOne?.community.removed).toBe(communityTwo?.community.removed);
|
||||||
|
@ -81,17 +81,17 @@ test("Delete community", async () => {
|
||||||
let deleteCommunityRes = await deleteCommunity(
|
let deleteCommunityRes = await deleteCommunity(
|
||||||
beta,
|
beta,
|
||||||
true,
|
true,
|
||||||
communityRes.community_view.community.id
|
communityRes.community_view.community.id,
|
||||||
);
|
);
|
||||||
expect(deleteCommunityRes.community_view.community.deleted).toBe(true);
|
expect(deleteCommunityRes.community_view.community.deleted).toBe(true);
|
||||||
expect(deleteCommunityRes.community_view.community.title).toBe(
|
expect(deleteCommunityRes.community_view.community.title).toBe(
|
||||||
communityRes.community_view.community.title
|
communityRes.community_view.community.title,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Make sure it got deleted on A
|
// Make sure it got deleted on A
|
||||||
let communityOnAlphaDeleted = await getCommunity(
|
let communityOnAlphaDeleted = await getCommunity(
|
||||||
alpha,
|
alpha,
|
||||||
alphaCommunity.community.id
|
alphaCommunity.community.id,
|
||||||
);
|
);
|
||||||
expect(communityOnAlphaDeleted.community_view.community.deleted).toBe(true);
|
expect(communityOnAlphaDeleted.community_view.community.deleted).toBe(true);
|
||||||
|
|
||||||
|
@ -99,17 +99,17 @@ test("Delete community", async () => {
|
||||||
let undeleteCommunityRes = await deleteCommunity(
|
let undeleteCommunityRes = await deleteCommunity(
|
||||||
beta,
|
beta,
|
||||||
false,
|
false,
|
||||||
communityRes.community_view.community.id
|
communityRes.community_view.community.id,
|
||||||
);
|
);
|
||||||
expect(undeleteCommunityRes.community_view.community.deleted).toBe(false);
|
expect(undeleteCommunityRes.community_view.community.deleted).toBe(false);
|
||||||
|
|
||||||
// Make sure it got undeleted on A
|
// Make sure it got undeleted on A
|
||||||
let communityOnAlphaUnDeleted = await getCommunity(
|
let communityOnAlphaUnDeleted = await getCommunity(
|
||||||
alpha,
|
alpha,
|
||||||
alphaCommunity.community.id
|
alphaCommunity.community.id,
|
||||||
);
|
);
|
||||||
expect(communityOnAlphaUnDeleted.community_view.community.deleted).toBe(
|
expect(communityOnAlphaUnDeleted.community_view.community.deleted).toBe(
|
||||||
false
|
false,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -133,17 +133,17 @@ test("Remove community", async () => {
|
||||||
let removeCommunityRes = await removeCommunity(
|
let removeCommunityRes = await removeCommunity(
|
||||||
beta,
|
beta,
|
||||||
true,
|
true,
|
||||||
communityRes.community_view.community.id
|
communityRes.community_view.community.id,
|
||||||
);
|
);
|
||||||
expect(removeCommunityRes.community_view.community.removed).toBe(true);
|
expect(removeCommunityRes.community_view.community.removed).toBe(true);
|
||||||
expect(removeCommunityRes.community_view.community.title).toBe(
|
expect(removeCommunityRes.community_view.community.title).toBe(
|
||||||
communityRes.community_view.community.title
|
communityRes.community_view.community.title,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Make sure it got Removed on A
|
// Make sure it got Removed on A
|
||||||
let communityOnAlphaRemoved = await getCommunity(
|
let communityOnAlphaRemoved = await getCommunity(
|
||||||
alpha,
|
alpha,
|
||||||
alphaCommunity.community.id
|
alphaCommunity.community.id,
|
||||||
);
|
);
|
||||||
expect(communityOnAlphaRemoved.community_view.community.removed).toBe(true);
|
expect(communityOnAlphaRemoved.community_view.community.removed).toBe(true);
|
||||||
|
|
||||||
|
@ -151,17 +151,17 @@ test("Remove community", async () => {
|
||||||
let unremoveCommunityRes = await removeCommunity(
|
let unremoveCommunityRes = await removeCommunity(
|
||||||
beta,
|
beta,
|
||||||
false,
|
false,
|
||||||
communityRes.community_view.community.id
|
communityRes.community_view.community.id,
|
||||||
);
|
);
|
||||||
expect(unremoveCommunityRes.community_view.community.removed).toBe(false);
|
expect(unremoveCommunityRes.community_view.community.removed).toBe(false);
|
||||||
|
|
||||||
// Make sure it got undeleted on A
|
// Make sure it got undeleted on A
|
||||||
let communityOnAlphaUnRemoved = await getCommunity(
|
let communityOnAlphaUnRemoved = await getCommunity(
|
||||||
alpha,
|
alpha,
|
||||||
alphaCommunity.community.id
|
alphaCommunity.community.id,
|
||||||
);
|
);
|
||||||
expect(communityOnAlphaUnRemoved.community_view.community.removed).toBe(
|
expect(communityOnAlphaUnRemoved.community_view.community.removed).toBe(
|
||||||
false
|
false,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ test("Admin actions in remote community are not federated to origin", async () =
|
||||||
bannedUserInfo2.person.id,
|
bannedUserInfo2.person.id,
|
||||||
betaCommunity.community.id,
|
betaCommunity.community.id,
|
||||||
true,
|
true,
|
||||||
true
|
true,
|
||||||
);
|
);
|
||||||
expect(banRes.banned).toBe(true);
|
expect(banRes.banned).toBe(true);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ test("Follow federated community", async () => {
|
||||||
// Check it from local
|
// Check it from local
|
||||||
let site = await getSite(alpha);
|
let site = await getSite(alpha);
|
||||||
let remoteCommunityId = site.my_user?.follows.find(
|
let remoteCommunityId = site.my_user?.follows.find(
|
||||||
c => c.community.local == false
|
c => c.community.local == false,
|
||||||
)?.community.id;
|
)?.community.id;
|
||||||
expect(remoteCommunityId).toBeDefined();
|
expect(remoteCommunityId).toBeDefined();
|
||||||
expect(site.my_user?.follows.length).toBe(2);
|
expect(site.my_user?.follows.length).toBe(2);
|
||||||
|
|
|
@ -379,7 +379,7 @@ test("Enforce site ban for federated user", async () => {
|
||||||
alpha,
|
alpha,
|
||||||
alphaPerson.person.id,
|
alphaPerson.person.id,
|
||||||
true,
|
true,
|
||||||
true
|
true,
|
||||||
);
|
);
|
||||||
expect(banAlpha.banned).toBe(true);
|
expect(banAlpha.banned).toBe(true);
|
||||||
|
|
||||||
|
@ -396,7 +396,7 @@ test("Enforce site ban for federated user", async () => {
|
||||||
alpha,
|
alpha,
|
||||||
alphaPerson.person.id,
|
alphaPerson.person.id,
|
||||||
false,
|
false,
|
||||||
false
|
false,
|
||||||
);
|
);
|
||||||
expect(unBanAlpha.banned).toBe(false);
|
expect(unBanAlpha.banned).toBe(false);
|
||||||
|
|
||||||
|
@ -431,7 +431,7 @@ test("Enforce community ban for federated user", async () => {
|
||||||
alphaPerson.person.id,
|
alphaPerson.person.id,
|
||||||
2,
|
2,
|
||||||
true,
|
true,
|
||||||
true
|
true,
|
||||||
);
|
);
|
||||||
expect(banAlpha.banned).toBe(true);
|
expect(banAlpha.banned).toBe(true);
|
||||||
|
|
||||||
|
@ -449,7 +449,7 @@ test("Enforce community ban for federated user", async () => {
|
||||||
alphaPerson.person.id,
|
alphaPerson.person.id,
|
||||||
2,
|
2,
|
||||||
false,
|
false,
|
||||||
false
|
false,
|
||||||
);
|
);
|
||||||
expect(unBanAlpha.banned).toBe(false);
|
expect(unBanAlpha.banned).toBe(false);
|
||||||
let postRes3 = await createPost(alpha, betaCommunity.community.id);
|
let postRes3 = await createPost(alpha, betaCommunity.community.id);
|
||||||
|
|
|
@ -43,15 +43,15 @@ test("Update a private message", async () => {
|
||||||
let pmRes = await createPrivateMessage(alpha, recipient_id);
|
let pmRes = await createPrivateMessage(alpha, recipient_id);
|
||||||
let pmUpdated = await editPrivateMessage(
|
let pmUpdated = await editPrivateMessage(
|
||||||
alpha,
|
alpha,
|
||||||
pmRes.private_message_view.private_message.id
|
pmRes.private_message_view.private_message.id,
|
||||||
);
|
);
|
||||||
expect(pmUpdated.private_message_view.private_message.content).toBe(
|
expect(pmUpdated.private_message_view.private_message.content).toBe(
|
||||||
updatedContent
|
updatedContent,
|
||||||
);
|
);
|
||||||
|
|
||||||
let betaPms = await listPrivateMessages(beta);
|
let betaPms = await listPrivateMessages(beta);
|
||||||
expect(betaPms.private_messages[0].private_message.content).toBe(
|
expect(betaPms.private_messages[0].private_message.content).toBe(
|
||||||
updatedContent
|
updatedContent,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ test("Delete a private message", async () => {
|
||||||
let deletedPmRes = await deletePrivateMessage(
|
let deletedPmRes = await deletePrivateMessage(
|
||||||
alpha,
|
alpha,
|
||||||
true,
|
true,
|
||||||
pmRes.private_message_view.private_message.id
|
pmRes.private_message_view.private_message.id,
|
||||||
);
|
);
|
||||||
expect(deletedPmRes.private_message_view.private_message.deleted).toBe(true);
|
expect(deletedPmRes.private_message_view.private_message.deleted).toBe(true);
|
||||||
|
|
||||||
|
@ -70,21 +70,21 @@ test("Delete a private message", async () => {
|
||||||
// no reason to show them
|
// no reason to show them
|
||||||
let betaPms2 = await listPrivateMessages(beta);
|
let betaPms2 = await listPrivateMessages(beta);
|
||||||
expect(betaPms2.private_messages.length).toBe(
|
expect(betaPms2.private_messages.length).toBe(
|
||||||
betaPms1.private_messages.length - 1
|
betaPms1.private_messages.length - 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Undelete
|
// Undelete
|
||||||
let undeletedPmRes = await deletePrivateMessage(
|
let undeletedPmRes = await deletePrivateMessage(
|
||||||
alpha,
|
alpha,
|
||||||
false,
|
false,
|
||||||
pmRes.private_message_view.private_message.id
|
pmRes.private_message_view.private_message.id,
|
||||||
);
|
);
|
||||||
expect(undeletedPmRes.private_message_view.private_message.deleted).toBe(
|
expect(undeletedPmRes.private_message_view.private_message.deleted).toBe(
|
||||||
false
|
false,
|
||||||
);
|
);
|
||||||
|
|
||||||
let betaPms3 = await listPrivateMessages(beta);
|
let betaPms3 = await listPrivateMessages(beta);
|
||||||
expect(betaPms3.private_messages.length).toBe(
|
expect(betaPms3.private_messages.length).toBe(
|
||||||
betaPms1.private_messages.length
|
betaPms1.private_messages.length,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -192,7 +192,7 @@ export async function setupLogins() {
|
||||||
|
|
||||||
export async function createPost(
|
export async function createPost(
|
||||||
api: API,
|
api: API,
|
||||||
community_id: number
|
community_id: number,
|
||||||
): Promise<PostResponse> {
|
): Promise<PostResponse> {
|
||||||
let name = randomString(5);
|
let name = randomString(5);
|
||||||
let body = randomString(10);
|
let body = randomString(10);
|
||||||
|
@ -220,7 +220,7 @@ export async function editPost(api: API, post: Post): Promise<PostResponse> {
|
||||||
export async function deletePost(
|
export async function deletePost(
|
||||||
api: API,
|
api: API,
|
||||||
deleted: boolean,
|
deleted: boolean,
|
||||||
post: Post
|
post: Post,
|
||||||
): Promise<PostResponse> {
|
): Promise<PostResponse> {
|
||||||
let form: DeletePost = {
|
let form: DeletePost = {
|
||||||
post_id: post.id,
|
post_id: post.id,
|
||||||
|
@ -233,7 +233,7 @@ export async function deletePost(
|
||||||
export async function removePost(
|
export async function removePost(
|
||||||
api: API,
|
api: API,
|
||||||
removed: boolean,
|
removed: boolean,
|
||||||
post: Post
|
post: Post,
|
||||||
): Promise<PostResponse> {
|
): Promise<PostResponse> {
|
||||||
let form: RemovePost = {
|
let form: RemovePost = {
|
||||||
post_id: post.id,
|
post_id: post.id,
|
||||||
|
@ -246,7 +246,7 @@ export async function removePost(
|
||||||
export async function featurePost(
|
export async function featurePost(
|
||||||
api: API,
|
api: API,
|
||||||
featured: boolean,
|
featured: boolean,
|
||||||
post: Post
|
post: Post,
|
||||||
): Promise<PostResponse> {
|
): Promise<PostResponse> {
|
||||||
let form: FeaturePost = {
|
let form: FeaturePost = {
|
||||||
post_id: post.id,
|
post_id: post.id,
|
||||||
|
@ -260,7 +260,7 @@ export async function featurePost(
|
||||||
export async function lockPost(
|
export async function lockPost(
|
||||||
api: API,
|
api: API,
|
||||||
locked: boolean,
|
locked: boolean,
|
||||||
post: Post
|
post: Post,
|
||||||
): Promise<PostResponse> {
|
): Promise<PostResponse> {
|
||||||
let form: LockPost = {
|
let form: LockPost = {
|
||||||
post_id: post.id,
|
post_id: post.id,
|
||||||
|
@ -272,7 +272,7 @@ export async function lockPost(
|
||||||
|
|
||||||
export async function resolvePost(
|
export async function resolvePost(
|
||||||
api: API,
|
api: API,
|
||||||
post: Post
|
post: Post,
|
||||||
): Promise<ResolveObjectResponse> {
|
): Promise<ResolveObjectResponse> {
|
||||||
let form: ResolveObject = {
|
let form: ResolveObject = {
|
||||||
q: post.ap_id,
|
q: post.ap_id,
|
||||||
|
@ -283,7 +283,7 @@ export async function resolvePost(
|
||||||
|
|
||||||
export async function searchPostLocal(
|
export async function searchPostLocal(
|
||||||
api: API,
|
api: API,
|
||||||
post: Post
|
post: Post,
|
||||||
): Promise<SearchResponse> {
|
): Promise<SearchResponse> {
|
||||||
let form: Search = {
|
let form: Search = {
|
||||||
q: post.name,
|
q: post.name,
|
||||||
|
@ -296,7 +296,7 @@ export async function searchPostLocal(
|
||||||
|
|
||||||
export async function getPost(
|
export async function getPost(
|
||||||
api: API,
|
api: API,
|
||||||
post_id: number
|
post_id: number,
|
||||||
): Promise<GetPostResponse> {
|
): Promise<GetPostResponse> {
|
||||||
let form: GetPost = {
|
let form: GetPost = {
|
||||||
id: post_id,
|
id: post_id,
|
||||||
|
@ -307,7 +307,7 @@ export async function getPost(
|
||||||
|
|
||||||
export async function getComments(
|
export async function getComments(
|
||||||
api: API,
|
api: API,
|
||||||
post_id: number
|
post_id: number,
|
||||||
): Promise<GetCommentsResponse> {
|
): Promise<GetCommentsResponse> {
|
||||||
let form: GetComments = {
|
let form: GetComments = {
|
||||||
post_id: post_id,
|
post_id: post_id,
|
||||||
|
@ -320,7 +320,7 @@ export async function getComments(
|
||||||
|
|
||||||
export async function resolveComment(
|
export async function resolveComment(
|
||||||
api: API,
|
api: API,
|
||||||
comment: Comment
|
comment: Comment,
|
||||||
): Promise<ResolveObjectResponse> {
|
): Promise<ResolveObjectResponse> {
|
||||||
let form: ResolveObject = {
|
let form: ResolveObject = {
|
||||||
q: comment.ap_id,
|
q: comment.ap_id,
|
||||||
|
@ -330,7 +330,7 @@ export async function resolveComment(
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function resolveBetaCommunity(
|
export async function resolveBetaCommunity(
|
||||||
api: API
|
api: API,
|
||||||
): Promise<ResolveObjectResponse> {
|
): Promise<ResolveObjectResponse> {
|
||||||
// Use short-hand search url
|
// Use short-hand search url
|
||||||
let form: ResolveObject = {
|
let form: ResolveObject = {
|
||||||
|
@ -342,7 +342,7 @@ export async function resolveBetaCommunity(
|
||||||
|
|
||||||
export async function resolveCommunity(
|
export async function resolveCommunity(
|
||||||
api: API,
|
api: API,
|
||||||
q: string
|
q: string,
|
||||||
): Promise<ResolveObjectResponse> {
|
): Promise<ResolveObjectResponse> {
|
||||||
let form: ResolveObject = {
|
let form: ResolveObject = {
|
||||||
q,
|
q,
|
||||||
|
@ -353,7 +353,7 @@ export async function resolveCommunity(
|
||||||
|
|
||||||
export async function resolvePerson(
|
export async function resolvePerson(
|
||||||
api: API,
|
api: API,
|
||||||
apShortname: string
|
apShortname: string,
|
||||||
): Promise<ResolveObjectResponse> {
|
): Promise<ResolveObjectResponse> {
|
||||||
let form: ResolveObject = {
|
let form: ResolveObject = {
|
||||||
q: apShortname,
|
q: apShortname,
|
||||||
|
@ -366,7 +366,7 @@ export async function banPersonFromSite(
|
||||||
api: API,
|
api: API,
|
||||||
person_id: number,
|
person_id: number,
|
||||||
ban: boolean,
|
ban: boolean,
|
||||||
remove_data: boolean
|
remove_data: boolean,
|
||||||
): Promise<BanPersonResponse> {
|
): Promise<BanPersonResponse> {
|
||||||
// Make sure lemmy-beta/c/main is cached on lemmy_alpha
|
// Make sure lemmy-beta/c/main is cached on lemmy_alpha
|
||||||
let form: BanPerson = {
|
let form: BanPerson = {
|
||||||
|
@ -383,7 +383,7 @@ export async function banPersonFromCommunity(
|
||||||
person_id: number,
|
person_id: number,
|
||||||
community_id: number,
|
community_id: number,
|
||||||
remove_data: boolean,
|
remove_data: boolean,
|
||||||
ban: boolean
|
ban: boolean,
|
||||||
): Promise<BanFromCommunityResponse> {
|
): Promise<BanFromCommunityResponse> {
|
||||||
let form: BanFromCommunity = {
|
let form: BanFromCommunity = {
|
||||||
person_id,
|
person_id,
|
||||||
|
@ -398,7 +398,7 @@ export async function banPersonFromCommunity(
|
||||||
export async function followCommunity(
|
export async function followCommunity(
|
||||||
api: API,
|
api: API,
|
||||||
follow: boolean,
|
follow: boolean,
|
||||||
community_id: number
|
community_id: number,
|
||||||
): Promise<CommunityResponse> {
|
): Promise<CommunityResponse> {
|
||||||
let form: FollowCommunity = {
|
let form: FollowCommunity = {
|
||||||
community_id,
|
community_id,
|
||||||
|
@ -411,7 +411,7 @@ export async function followCommunity(
|
||||||
export async function likePost(
|
export async function likePost(
|
||||||
api: API,
|
api: API,
|
||||||
score: number,
|
score: number,
|
||||||
post: Post
|
post: Post,
|
||||||
): Promise<PostResponse> {
|
): Promise<PostResponse> {
|
||||||
let form: CreatePostLike = {
|
let form: CreatePostLike = {
|
||||||
post_id: post.id,
|
post_id: post.id,
|
||||||
|
@ -426,7 +426,7 @@ export async function createComment(
|
||||||
api: API,
|
api: API,
|
||||||
post_id: number,
|
post_id: number,
|
||||||
parent_id?: number,
|
parent_id?: number,
|
||||||
content = "a jest test comment"
|
content = "a jest test comment",
|
||||||
): Promise<CommentResponse> {
|
): Promise<CommentResponse> {
|
||||||
let form: CreateComment = {
|
let form: CreateComment = {
|
||||||
content,
|
content,
|
||||||
|
@ -440,7 +440,7 @@ export async function createComment(
|
||||||
export async function editComment(
|
export async function editComment(
|
||||||
api: API,
|
api: API,
|
||||||
comment_id: number,
|
comment_id: number,
|
||||||
content = "A jest test federated comment update"
|
content = "A jest test federated comment update",
|
||||||
): Promise<CommentResponse> {
|
): Promise<CommentResponse> {
|
||||||
let form: EditComment = {
|
let form: EditComment = {
|
||||||
content,
|
content,
|
||||||
|
@ -453,7 +453,7 @@ export async function editComment(
|
||||||
export async function deleteComment(
|
export async function deleteComment(
|
||||||
api: API,
|
api: API,
|
||||||
deleted: boolean,
|
deleted: boolean,
|
||||||
comment_id: number
|
comment_id: number,
|
||||||
): Promise<CommentResponse> {
|
): Promise<CommentResponse> {
|
||||||
let form: DeleteComment = {
|
let form: DeleteComment = {
|
||||||
comment_id,
|
comment_id,
|
||||||
|
@ -466,7 +466,7 @@ export async function deleteComment(
|
||||||
export async function removeComment(
|
export async function removeComment(
|
||||||
api: API,
|
api: API,
|
||||||
removed: boolean,
|
removed: boolean,
|
||||||
comment_id: number
|
comment_id: number,
|
||||||
): Promise<CommentResponse> {
|
): Promise<CommentResponse> {
|
||||||
let form: RemoveComment = {
|
let form: RemoveComment = {
|
||||||
comment_id,
|
comment_id,
|
||||||
|
@ -477,7 +477,7 @@ export async function removeComment(
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getMentions(
|
export async function getMentions(
|
||||||
api: API
|
api: API,
|
||||||
): Promise<GetPersonMentionsResponse> {
|
): Promise<GetPersonMentionsResponse> {
|
||||||
let form: GetPersonMentions = {
|
let form: GetPersonMentions = {
|
||||||
sort: "New",
|
sort: "New",
|
||||||
|
@ -490,7 +490,7 @@ export async function getMentions(
|
||||||
export async function likeComment(
|
export async function likeComment(
|
||||||
api: API,
|
api: API,
|
||||||
score: number,
|
score: number,
|
||||||
comment: Comment
|
comment: Comment,
|
||||||
): Promise<CommentResponse> {
|
): Promise<CommentResponse> {
|
||||||
let form: CreateCommentLike = {
|
let form: CreateCommentLike = {
|
||||||
comment_id: comment.id,
|
comment_id: comment.id,
|
||||||
|
@ -502,7 +502,7 @@ export async function likeComment(
|
||||||
|
|
||||||
export async function createCommunity(
|
export async function createCommunity(
|
||||||
api: API,
|
api: API,
|
||||||
name_: string = randomString(5)
|
name_: string = randomString(5),
|
||||||
): Promise<CommunityResponse> {
|
): Promise<CommunityResponse> {
|
||||||
let description = "a sample description";
|
let description = "a sample description";
|
||||||
let form: CreateCommunity = {
|
let form: CreateCommunity = {
|
||||||
|
@ -516,7 +516,7 @@ export async function createCommunity(
|
||||||
|
|
||||||
export async function getCommunity(
|
export async function getCommunity(
|
||||||
api: API,
|
api: API,
|
||||||
id: number
|
id: number,
|
||||||
): Promise<CommunityResponse> {
|
): Promise<CommunityResponse> {
|
||||||
let form: GetCommunity = {
|
let form: GetCommunity = {
|
||||||
id,
|
id,
|
||||||
|
@ -528,7 +528,7 @@ export async function getCommunity(
|
||||||
export async function deleteCommunity(
|
export async function deleteCommunity(
|
||||||
api: API,
|
api: API,
|
||||||
deleted: boolean,
|
deleted: boolean,
|
||||||
community_id: number
|
community_id: number,
|
||||||
): Promise<CommunityResponse> {
|
): Promise<CommunityResponse> {
|
||||||
let form: DeleteCommunity = {
|
let form: DeleteCommunity = {
|
||||||
community_id,
|
community_id,
|
||||||
|
@ -541,7 +541,7 @@ export async function deleteCommunity(
|
||||||
export async function removeCommunity(
|
export async function removeCommunity(
|
||||||
api: API,
|
api: API,
|
||||||
removed: boolean,
|
removed: boolean,
|
||||||
community_id: number
|
community_id: number,
|
||||||
): Promise<CommunityResponse> {
|
): Promise<CommunityResponse> {
|
||||||
let form: RemoveCommunity = {
|
let form: RemoveCommunity = {
|
||||||
community_id,
|
community_id,
|
||||||
|
@ -553,7 +553,7 @@ export async function removeCommunity(
|
||||||
|
|
||||||
export async function createPrivateMessage(
|
export async function createPrivateMessage(
|
||||||
api: API,
|
api: API,
|
||||||
recipient_id: number
|
recipient_id: number,
|
||||||
): Promise<PrivateMessageResponse> {
|
): Promise<PrivateMessageResponse> {
|
||||||
let content = "A jest test federated private message";
|
let content = "A jest test federated private message";
|
||||||
let form: CreatePrivateMessage = {
|
let form: CreatePrivateMessage = {
|
||||||
|
@ -566,7 +566,7 @@ export async function createPrivateMessage(
|
||||||
|
|
||||||
export async function editPrivateMessage(
|
export async function editPrivateMessage(
|
||||||
api: API,
|
api: API,
|
||||||
private_message_id: number
|
private_message_id: number,
|
||||||
): Promise<PrivateMessageResponse> {
|
): Promise<PrivateMessageResponse> {
|
||||||
let updatedContent = "A jest test federated private message edited";
|
let updatedContent = "A jest test federated private message edited";
|
||||||
let form: EditPrivateMessage = {
|
let form: EditPrivateMessage = {
|
||||||
|
@ -580,7 +580,7 @@ export async function editPrivateMessage(
|
||||||
export async function deletePrivateMessage(
|
export async function deletePrivateMessage(
|
||||||
api: API,
|
api: API,
|
||||||
deleted: boolean,
|
deleted: boolean,
|
||||||
private_message_id: number
|
private_message_id: number,
|
||||||
): Promise<PrivateMessageResponse> {
|
): Promise<PrivateMessageResponse> {
|
||||||
let form: DeletePrivateMessage = {
|
let form: DeletePrivateMessage = {
|
||||||
deleted,
|
deleted,
|
||||||
|
@ -592,7 +592,7 @@ export async function deletePrivateMessage(
|
||||||
|
|
||||||
export async function registerUser(
|
export async function registerUser(
|
||||||
api: API,
|
api: API,
|
||||||
username: string = randomString(5)
|
username: string = randomString(5),
|
||||||
): Promise<LoginResponse> {
|
): Promise<LoginResponse> {
|
||||||
let form: Register = {
|
let form: Register = {
|
||||||
username,
|
username,
|
||||||
|
@ -619,7 +619,7 @@ export async function saveUserSettingsBio(api: API): Promise<LoginResponse> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function saveUserSettingsFederated(
|
export async function saveUserSettingsFederated(
|
||||||
api: API
|
api: API,
|
||||||
): Promise<LoginResponse> {
|
): Promise<LoginResponse> {
|
||||||
let avatar = "https://image.flaticon.com/icons/png/512/35/35896.png";
|
let avatar = "https://image.flaticon.com/icons/png/512/35/35896.png";
|
||||||
let banner = "https://image.flaticon.com/icons/png/512/36/35896.png";
|
let banner = "https://image.flaticon.com/icons/png/512/36/35896.png";
|
||||||
|
@ -642,7 +642,7 @@ export async function saveUserSettingsFederated(
|
||||||
|
|
||||||
export async function saveUserSettings(
|
export async function saveUserSettings(
|
||||||
api: API,
|
api: API,
|
||||||
form: SaveUserSettings
|
form: SaveUserSettings,
|
||||||
): Promise<LoginResponse> {
|
): Promise<LoginResponse> {
|
||||||
return api.client.saveUserSettings(form);
|
return api.client.saveUserSettings(form);
|
||||||
}
|
}
|
||||||
|
@ -663,7 +663,7 @@ export async function getSite(api: API): Promise<GetSiteResponse> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function listPrivateMessages(
|
export async function listPrivateMessages(
|
||||||
api: API
|
api: API,
|
||||||
): Promise<PrivateMessagesResponse> {
|
): Promise<PrivateMessagesResponse> {
|
||||||
let form: GetPrivateMessages = {
|
let form: GetPrivateMessages = {
|
||||||
auth: api.auth,
|
auth: api.auth,
|
||||||
|
@ -697,7 +697,7 @@ export async function followBeta(api: API): Promise<CommunityResponse> {
|
||||||
export async function reportPost(
|
export async function reportPost(
|
||||||
api: API,
|
api: API,
|
||||||
post_id: number,
|
post_id: number,
|
||||||
reason: string
|
reason: string,
|
||||||
): Promise<PostReportResponse> {
|
): Promise<PostReportResponse> {
|
||||||
let form: CreatePostReport = {
|
let form: CreatePostReport = {
|
||||||
post_id,
|
post_id,
|
||||||
|
@ -708,7 +708,7 @@ export async function reportPost(
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function listPostReports(
|
export async function listPostReports(
|
||||||
api: API
|
api: API,
|
||||||
): Promise<ListPostReportsResponse> {
|
): Promise<ListPostReportsResponse> {
|
||||||
let form: ListPostReports = {
|
let form: ListPostReports = {
|
||||||
auth: api.auth,
|
auth: api.auth,
|
||||||
|
@ -719,7 +719,7 @@ export async function listPostReports(
|
||||||
export async function reportComment(
|
export async function reportComment(
|
||||||
api: API,
|
api: API,
|
||||||
comment_id: number,
|
comment_id: number,
|
||||||
reason: string
|
reason: string,
|
||||||
): Promise<CommentReportResponse> {
|
): Promise<CommentReportResponse> {
|
||||||
let form: CreateCommentReport = {
|
let form: CreateCommentReport = {
|
||||||
comment_id,
|
comment_id,
|
||||||
|
@ -730,7 +730,7 @@ export async function reportComment(
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function listCommentReports(
|
export async function listCommentReports(
|
||||||
api: API
|
api: API,
|
||||||
): Promise<ListCommentReportsResponse> {
|
): Promise<ListCommentReportsResponse> {
|
||||||
let form: ListCommentReports = {
|
let form: ListCommentReports = {
|
||||||
auth: api.auth,
|
auth: api.auth,
|
||||||
|
|
|
@ -2461,10 +2461,10 @@ prettier-linter-helpers@^1.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
fast-diff "^1.1.2"
|
fast-diff "^1.1.2"
|
||||||
|
|
||||||
prettier@^2.8.8:
|
prettier@^3.0.0:
|
||||||
version "2.8.8"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.0.tgz#e7b19f691245a21d618c68bc54dc06122f6105ae"
|
||||||
integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
|
integrity sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==
|
||||||
|
|
||||||
pretty-format@^29.0.0, pretty-format@^29.5.0:
|
pretty-format@^29.0.0, pretty-format@^29.5.0:
|
||||||
version "29.5.0"
|
version "29.5.0"
|
||||||
|
|
Loading…
Reference in a new issue