ConnectyCube / connectycube-reactnative-samples

Chat and Video Chat code samples for React Native, ConnectyCube
https://connectycube.com
Apache License 2.0
124 stars 111 forks source link

Filter the dialogs with no messages and deleteds users #251

Closed JhosepIslam closed 3 years ago

JhosepIslam commented 3 years ago

What filter should I use to not get a list of dialogs without messages or in case it is a dialog of 2 users, not get it if one was deleted?

The documentation mentions these filters, but how should I use them? Retrieve dialogs with the exact data specified in the request with applying additional filters. Available filters: lt (Less Than operator), lte (Less Than or Equal to operator), gt (Greater Than operator), gte (Greater Than or Equal to operator), ne (Not Equal to operator), in (Contained IN array operator), nin (Not contained IN array), all (ALL contained IN array), ctn (Contains substring operator)

DaveLomber commented 3 years ago

There is no filter to skip dialogs w/o messages

The best way is to do it on client side using array.filter function.

Regarding deleted 1-1 chats, you basically does not know whether it's deleted at other side or now, so there is no way to filter by this param