Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Commit 803fdd5

Browse files
authored
Merge pull request #2639 from withspectrum/fix-private-channel-join
Fix private channel join
2 parents 894140e + 8046613 commit 803fdd5

7 files changed

+13
-7
lines changed

Diff for: iris/mutations/channel/disableChannelTokenJoin.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ export default async (
3333

3434
loaders.channelSettings.clear(channelId);
3535

36-
if (settings) {
36+
// settings.id tells us that a channelSettings record exists in the db
37+
if (settings.id) {
3738
return await disableChannelTokenJoin(channelId);
3839
} else {
3940
return await createChannelSettings(channelId);

Diff for: iris/mutations/channel/enableChannelTokenJoin.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ export default async (
3333

3434
loaders.channelSettings.clear(channelId);
3535

36-
if (settings) {
36+
// settings.id tells us that a channelSettings record exists in the db
37+
if (settings.id) {
3738
return await enableChannelTokenJoin(channelId);
3839
} else {
3940
return await createChannelSettings(channelId).then(() =>

Diff for: iris/mutations/channel/resetChannelJoinToken.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ export default async (
3434

3535
loaders.channelSettings.clear(channelId);
3636

37-
if (settings) {
37+
// settings.id tells us that a channelSettings record exists in the db
38+
if (settings.id) {
3839
return await resetChannelJoinToken(channelId);
3940
} else {
4041
return await createChannelSettings(channelId).then(

Diff for: iris/mutations/community/disableBrandedLogin.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ export default async (
3333

3434
loaders.communitySettings.clear(communityId);
3535

36-
if (settings) {
36+
// settings.id tells us that a channelSettings record exists in the db
37+
if (settings.id) {
3738
return await disableCommunityBrandedLogin(communityId);
3839
} else {
3940
return await createCommunitySettings(communityId);

Diff for: iris/mutations/community/enableBrandedLogin.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ export default async (
3333

3434
loaders.communitySettings.clear(communityId);
3535

36-
if (settings) {
36+
// settings.id tells us that a channelSettings record exists in the db
37+
if (settings.id) {
3738
return await enableCommunityBrandedLogin(communityId);
3839
} else {
3940
return await createCommunitySettings(communityId).then(

Diff for: iris/mutations/community/saveBrandedLoginSettings.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ export default async (
4040

4141
loaders.communitySettings.clear(communityId);
4242

43-
if (settings) {
43+
// settings.id tells us that a channelSettings record exists in the db
44+
if (settings.id) {
4445
return await updateCommunityBrandedLoginMessage(communityId, message);
4546
} else {
4647
return await createCommunitySettings(communityId).then(

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Spectrum",
3-
"version": "2.1.11",
3+
"version": "2.1.12",
44
"private": true,
55
"devDependencies": {
66
"babel-cli": "^6.24.1",

0 commit comments

Comments
 (0)