Skip to content

Re-adding a user/participant into a conversation creates a new participant object but can never be properly removed again #41

@wkeithchau

Description

@wkeithchau

The issue that I am experiencing is when trying to remove a user from a conversation for the second time.

When a user is re-added a new participant document is created and linked up with the conversation. Then when the same user is removed from the conversation for the second time conversation.removeParticipant isn't setting the deleted field on the correct participant document (it is actually setting it on the initial document that has already been flagged as deleted).

I could help fix this issue but how should this workflow be handled?

  1. Should conversation.addParticipant never create a new participant for the same user-conversation pairing and update the existing participant document?
  2. Or should conversation.removeParticipant be fixed so the query is finding the document that does not have the deleted flag set yet?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions