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

fix(dm): Prevent creating duplicate conversations for users in multiple common servers/on reconnection #691

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

AbdurrehmanSubhani
Copy link
Contributor

@AbdurrehmanSubhani AbdurrehmanSubhani commented Nov 27, 2024

Add guard to dm conversation creation (users having common servers, dm event for each guild)

Fixes:
#689

  • Discord Agent Bot goes through each member in guild and sends 'dmconnect' event to the connected user

  • connected user on receiving the 'dmconnect' creates a new conversation object, uses the discord user's userId as hash and adds it to the manager

  • so here since the userId is being used to create the conversation object key

  • a user with common servers with the bot will be sent twice with dmconnect (from each guild/server)

  • since this is dm, there must be no duplicate dm conversations for the same user

Copy link

vercel bot commented Nov 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
chat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 28, 2024 5:05pm
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 28, 2024 5:05pm

@AbdurrehmanSubhani AbdurrehmanSubhani changed the title fix(dm): Prevent duplicate DM conversations for users in multiple common servers fix(dm): Prevent creating duplicate conversations for users in multiple common servers/on reconnection Nov 28, 2024
@mavisakalyan mavisakalyan merged commit fae60c0 into dev Dec 6, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants