diff --git a/github/handlers/ExecuteBlockActionHandler.ts b/github/handlers/ExecuteBlockActionHandler.ts index 93c3c88..1f58c3e 100644 --- a/github/handlers/ExecuteBlockActionHandler.ts +++ b/github/handlers/ExecuteBlockActionHandler.ts @@ -292,7 +292,7 @@ export class ExecuteBlockActionHandler { const storeData = { profileParams: profileInteractionData as string[] } - await this.persistence.updateByAssociation(new RocketChatAssociationRecord(RocketChatAssociationModel.MISC, "ProfileShareParam"), storeData); + await this.persistence.updateByAssociation(new RocketChatAssociationRecord(RocketChatAssociationModel.MISC, "ProfileShareParam"), storeData, true); } break; } @@ -671,13 +671,13 @@ export class ExecuteBlockActionHandler { return context.getInteractionResponder().openModalViewResponse(shareProfileMod); } case ModalsEnum.APPROVE_PULL_REQUEST_ACTION:{ - + let value: string = context.getInteractionData().value as string; let splittedValues = value?.split(" "); let { user } = await context.getInteractionData(); let { room} = await context.getInteractionData(); let accessToken = await getAccessTokenForUser(this.read, user, this.app.oauth2Config) as IAuthData; - + if(splittedValues.length==2 && accessToken?.token){ let data={ "repo" : splittedValues[0], @@ -1026,8 +1026,8 @@ export class ExecuteBlockActionHandler { } } break; - } - + } + case ModalsEnum.GITHUB_LOGIN_ACTION :{ const {user, room} = context.getInteractionData(); if(room){ @@ -1073,7 +1073,7 @@ export class ExecuteBlockActionHandler { }); return context.getInteractionResponder().openModalViewResponse(newIssueModal); } - + case ModalsEnum.TRIGGER_SEARCH_MODAL: { const searchModal = await githubSearchModal({ modify: this.modify, @@ -1096,13 +1096,13 @@ export class ExecuteBlockActionHandler { const message = `You have unsubscribed from repository [${repo} Pull Request #${number}](https://github.com/${repo}/pull/${number})`; await sendNotification(this.read, this.modify, user, room as IRoom, message); - + } - + case ModalsEnum.REMINDER_REMOVE_REPO_ACTION : { - const {value, user} = context.getInteractionData(); + const {value, user} = context.getInteractionData(); await removeRepoReminder(this.read, this.persistence, value as string, user); - + const updatedReminderModal = await reminderModal({modify: this.modify, read:this.read, persistence: this.persistence, http: this.http, uikitcontext: context}); return context.getInteractionResponder().updateModalViewResponse( updatedReminderModal); @@ -1114,4 +1114,4 @@ export class ExecuteBlockActionHandler { return context.getInteractionResponder().successResponse(); } -} \ No newline at end of file +}