Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added reply button in email threads #6642

Closed
wants to merge 0 commits into from

Conversation

ehconitin
Copy link
Contributor

Issue #4217

Please let me know what do you think.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This pull request implements the 'Reply (View in Gmail)' button functionality for email threads, addressing issue #4217. The changes focus on integrating Gmail redirection within the email thread view.

  • Added 'Reply (View in Gmail)' button in RightDrawerEmailThread component
  • Implemented useRightDrawerEmailThread hook to fetch messageThreadExternalId for Gmail URL construction
  • Created new MessageThreadExternalId type and added MessageChannelMessageAssociation to CoreObjectNameSingular enum
  • Updated EmailThreadMessageParticipant type to include messageId field
  • Modified fetchAllThreadMessagesOperationSignatureFactory to include messageId in the query

6 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings

];
const lastMessageId = lastParticipant?.messageId;

const {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Consider adding pagination or limiting the number of records fetched for messageThreadExternalIdsData to optimize performance

@lucasbordeau lucasbordeau self-assigned this Aug 20, 2024
@ehconitin
Copy link
Contributor Author

Thanks for the review @lucasbordeau !

}

const userEmail = currentUser?.email;
const url = `https://mail.google.com/mail/?authuser=${userEmail}#all/${messageThreadExternalId}`;
Copy link
Contributor

@lucasbordeau lucasbordeau Aug 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it would help to put not the userEmail but the connected account related to this thread.

For example I connected a second gmail account and when I clicked on reply it tried to open the first default demo [email protected] account (which doesn't exist)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my case, if I connect a second gmail account with then default [email protected], emails dont get imported for the second gmail account. Idk if thats a bug from my end.
I am running these cron jobs -
npx nx run twenty-server:command cron:messaging:messages-import
npx nx run twenty-server:command cron:messaging:message-list-fetch
These jobs are it right? or are there anymore?
But it does make sense to have connected account related to the thread to be populated here.
Issue is I couldnt find a connected account related to that thread or message table.
How do i get the connected account related to that thread?
Need help :(

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to run the worker with :

yarn nx worker twenty-server (it will process the jobs)

Then create the cron with : npx nx run twenty-server:command cron:messaging:messages-import

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do run worker using npx nx run twenty-server:worker and then cron jobs.
Ill check them once more however I cant find a connected account related to that thread or message table.
How do i get the connected account related to that thread?

@ehconitin
Copy link
Contributor Author

@lucasbordeau

Could you confirm if this is whats happening.
on connecting a second account to default [email protected] account, message table doesnt get filled with second accounts messages?
I checked it multiple times, it does show syncStatus as ACTIVE for the second account, but messages table are not being populated with its messages.

image

It gets populated only for the account we are signing in.

image

@lucasbordeau
Copy link
Contributor

@ehconitin Could you contact me on Discord ? It would be easier to solve this.

Could you check that you have those options also :

image

@ehconitin
Copy link
Contributor Author

my bad @lucasbordeau
creating a new pr for this issue closing this one.

@ehconitin ehconitin deleted the fixed-issue-4217 branch September 2, 2024 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants