"eslint": "^7.30.0",
"eslint-plugin-jane": "^9.0.3",
"jest": "^27.0.6",
- "lemmy-js-client": "0.17.0-rc.1",
+ "lemmy-js-client": "0.17.0-rc.2",
"node-fetch": "^2.6.1",
"prettier": "^2.3.2",
"ts-jest": "^27.0.3",
// Test an unfollow
let unfollow = await followCommunity(alpha, false, remoteCommunityId);
- expect(unfollow.community_follower_view.community.local).toBe(false);
+ expect(unfollow.community_follower_view).toBeNull()
// Make sure you are unsubbed locally
let siteUnfollowCheck = await getSite(alpha);
dependencies:
language-subtag-registry "~0.3.2"
-lemmy-js-client@0.17.0-rc.1:
- version "0.17.0-rc.1"
- resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.17.0-rc.1.tgz#153fae5a06f047fe59a00847589b80736a30277b"
- integrity sha512-dHkL5eXHTSxchyxn8yXj33iuh1UQ8OmebUJY6PstQPxL8ZOFBKlVEJs8UlXBJgeDkDTc2OObNpUd2uFqhEt6jg==
+lemmy-js-client@0.17.0-rc.2:
+ version "0.17.0-rc.2"
+ resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.17.0-rc.2.tgz#4e6ff9a8d83ac922cd36eeaa01c657b3b93309e6"
+ integrity sha512-2YkZiAkq2ZUHPSl/B7pvMMkI19XRtTKwLFJ1u4NT2BlFkNdlvkvkOddnJ6aRwKAp/WBohxoKLoDHhlwePS5gqA==
leven@^3.1.0:
version "3.1.0"
let community_follower_view = blocking(context.pool(), move |conn| {
CommunityFollowerView::read(conn, community_id, person_id)
})
- .await??;
+ .await?.ok();
Ok(Self::Response {
community_follower_view,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
+/// An unfollow will return None
pub struct FollowCommunityResponse {
- pub community_follower_view: CommunityFollowerView,
+ pub community_follower_view: Option<CommunityFollowerView>,
}
#[derive(Debug, Serialize, Deserialize, Clone, Default)]