[BUGFIX] Reply button opens google (#10269)

fixes https://github.com/twentyhq/twenty/issues/10242
This commit is contained in:
Guillim
2025-02-19 09:58:50 +01:00
committed by GitHub
parent 248ec4cd6f
commit dca4fc1423
3 changed files with 43 additions and 5 deletions

View File

@ -132,7 +132,10 @@ export const useRightDrawerEmailThread = () => {
recordGqlFields: {
id: true,
handle: true,
connectedAccountId: true,
connectedAccount: {
id: true,
provider: true,
},
},
skip: !lastMessageChannelId,
});
@ -159,11 +162,17 @@ export const useRightDrawerEmailThread = () => {
})
.filter(isDefined);
const connectedAccount =
messageChannelData.length > 0
? messageChannelData[0]?.connectedAccount
: null;
const connectedAccountProvider = connectedAccount?.provider ?? null;
return {
thread,
messages: messagesWithSender,
messageThreadExternalId,
connectedAccountHandle,
connectedAccountProvider,
threadLoading: messagesLoading,
messageChannelLoading,
fetchMoreMessages,