Skip to content

Commit

Permalink
Merge pull request #22 from Nabhag8848/fix/login-block
Browse files Browse the repository at this point in the history
[FIX] login block sending message instead of notify
  • Loading branch information
Nabhag8848 authored Mar 20, 2023
2 parents ee95562 + 6fe06e2 commit 903b439
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions oauth2/lib/oauth2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,15 @@ export class OAuth2Client {
},
],
});

await modify.getCreator().finish(messageBuilder);
} catch (err) {
messageBuilder.setText(
"An error occurred when trying to send the login url:disappointed_relieved:"
);

await modify
.getNotifier()
.notifyUser(context.getSender(), messageBuilder.getMessage());
}

await modify
.getNotifier()
.notifyUser(context.getSender(), messageBuilder.getMessage());
}

public async logout(
Expand All @@ -91,7 +89,9 @@ export class OAuth2Client {
.setSender(appBot);

if (tokenInfo?.access_token) {
const tokenInfo = await oAuthStorage.removeTokenInfoOfUser(context.getSender().id);
const tokenInfo = await oAuthStorage.removeTokenInfoOfUser(
context.getSender().id
);
messageBuilder.setText("✅ Logout Successful");
} else {
messageBuilder.setText(
Expand Down

0 comments on commit 903b439

Please sign in to comment.