Skip to content

Commit

Permalink
Twiddle
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot committed May 11, 2020
1 parent ae75e4b commit 6b0b37a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Provisioning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ export class Provisioner {

private async determineSlackIdForRequest(matrixUserId, teamId) {
const matrixUser = await this.main.datastore.getMatrixUser(matrixUserId);
if (matrixUser === null) {
throw Error('No users found');
if (!matrixUser) {
// No Slack user entry found for MXID
return null;
}
const accounts: {[userId: string]: {team_id: string}} = matrixUser.get("accounts");
for (const [key, value] of Object.entries(accounts)) {
Expand Down Expand Up @@ -175,6 +176,7 @@ export class Provisioner {
const cli = await this.main.clientFactory.getTeamClient(teamId);
try {
let types = "public_channel";
// Unless we *explicity* set this to false, allow it.
if (this.main.config.provisioning?.allow_private_channels !== false) {
types = `public_channel,private_channel`;
}
Expand Down

0 comments on commit 6b0b37a

Please sign in to comment.