mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 21:19:13 +00:00
Send bot notice on GitHub OAuth success (#512)
* Send bot notice on GitHub OAuth success i.e. the same as is done for Jira * Nitpick: don't backtick plain string message
This commit is contained in:
parent
31aa5e90ad
commit
d570dc8a3a
1
changelog.d/512.feature
Normal file
1
changelog.d/512.feature
Normal file
@ -0,0 +1 @@
|
||||
Print a notice message after successfully logging in to GitHub when conversing with the bot in a DM.
|
@ -420,6 +420,12 @@ export class Bridge {
|
||||
refresh_token: msg.data.refresh_token,
|
||||
refresh_token_expires_in: msg.data.refresh_token_expires_in && ((parseInt(msg.data.refresh_token_expires_in) * 1000) + Date.now()),
|
||||
} as GitHubOAuthToken));
|
||||
|
||||
// Some users won't have an admin room and would have gone through provisioning.
|
||||
const adminRoom = [...this.adminRooms.values()].find(r => r.userId === userId);
|
||||
if (adminRoom) {
|
||||
await adminRoom.sendNotice("Logged into GitHub");
|
||||
}
|
||||
});
|
||||
|
||||
this.bindHandlerToQueue<IGitLabWebhookNoteEvent, GitLabIssueConnection|GitLabRepoConnection>(
|
||||
@ -535,7 +541,7 @@ export class Bridge {
|
||||
// Some users won't have an admin room and would have gone through provisioning.
|
||||
const adminRoom = [...this.adminRooms.values()].find(r => r.userId === userId);
|
||||
if (adminRoom) {
|
||||
await adminRoom.sendNotice(`Logged into Jira`);
|
||||
await adminRoom.sendNotice("Logged into Jira");
|
||||
}
|
||||
result = JiraOAuthRequestResult.Success;
|
||||
} catch (ex) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user