When I remove a chat room, I do it this way:
1. remove all the message docs in the chat room,
2. then remove the chat room doc.
>From the definition of the Syn Function, I think this could remove the
message docs and chat room docs on all the related mobiles, right? Is there
any other issue with this way I did not think of?
Thanks for your quick response.
Guofeng
On Fri, Oct 17, 2014 at 12:20 AM, Jens Alfke <[email protected]> wrote:
>
> On Oct 16, 2014, at 4:43 AM, Guofeng Zhang <[email protected]> wrote:
>
> Now I want to close the chat rooms and also want to the synced docs on any
> mobile that has synced to to be removed completely. Note that I also want
> to remove the chat room too.
>
>
> In the CouchChat example, if you delete the chat room document, everyone
> loses access to the channel that the chat message documents are in, and the
> chat will no longer show up in the UI because its document is gone. But the
> messages remain.
>
> Currently, the client is not notified when it loses access to a channel,
> and it doesn't delete the documents. This is appropriate in some
> situations (my analogy is that "if your subscription to the New Yorker
> expires, they don't come to your house and take away your magazines"), but
> many developers have asked for the local docs to be deleted.
>
> There's an issue in Sync Gateway tracking this (I'm offline right now so I
> can't look up a link) and I've done some implementation work, but it's
> actually a tough problem due to the way channels are implemented. We're
> hoping to add this in a future release.
>
> —Jens
>
> --
> You received this message because you are subscribed to the Google Groups
> "Couchbase Mobile" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mobile-couchbase/191C54C4-24AA-45CC-98C0-F222F4CAD386%40couchbase.com
> <https://groups.google.com/d/msgid/mobile-couchbase/191C54C4-24AA-45CC-98C0-F222F4CAD386%40couchbase.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mobile-couchbase/CAMpUGn1LXtsK6Q8%2BtPreSu6nzpak_5PsjHk1smJBt6G8p3TAoA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.