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(ParticipantsStore): Purge the store so it deletes the removed conversation #11219

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

DorraJaouad
Copy link
Contributor

☑️ Resolves

🖌️ UI Checklist

🖼️ Screenshots / Screencasts

🏚️ Before 🏡 After
image image

🚧 Tasks

  • Code review

🏁 Checklist

@DorraJaouad
Copy link
Contributor Author

/backport to stable28

@Antreesy
Copy link
Contributor

Antreesy commented Dec 13, 2023

Half of the problem solved =)

If open conversation was cached, then you left and reload a page, BrowserStorage still keeps it for you, and on reload populates participantsStore again.

Let's add this line to the end of action:
context.dispatch('cacheConversations')

deleteConversation(context, token) {
// FIXME: rename to deleteConversationsFromStore or a better name
const chatExtrasStore = useChatExtrasStore()
chatExtrasStore.purgeChatExtras(token)
context.dispatch('deleteMessages', token)
context.commit('deleteConversation', token)
},

@DorraJaouad DorraJaouad force-pushed the fix/11101/duplicate-self-in-participants branch from d0a81bb to ff316e1 Compare December 13, 2023 13:07
@DorraJaouad DorraJaouad force-pushed the fix/11101/duplicate-self-in-participants branch 2 times, most recently from f7a313d to 86c3113 Compare December 13, 2023 21:39
@DorraJaouad DorraJaouad force-pushed the fix/11101/duplicate-self-in-participants branch from 86c3113 to 100dd1c Compare December 14, 2023 07:43
Copy link
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

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

Tested when leaving conversation, deleting self, and deleted by moderator. Purged and cached correctly

@Antreesy Antreesy merged commit 97982df into main Dec 15, 2023
36 checks passed
@Antreesy Antreesy deleted the fix/11101/duplicate-self-in-participants branch December 15, 2023 08:25
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.

Quirks joining an open conversation
2 participants