-
Notifications
You must be signed in to change notification settings - Fork 90
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
Adding user to dialog which does not exist in user. #311
Comments
can u give me method like getAllDialogs ? from connectycube ? |
I can see the next solution here:
{
'dialog_id':'',
'dialog_name': '',
'dialog_description': '',
'inviting_user': 0,
'invited_user': 1,
'status': 'invited',
// other field required by your app
}
If you prefer to use the GROUP dialogs for it, you need to develop the logic for notifying the inviting user about the necessity to update the group dialog by adding the invited user to the dialog members. |
@TatankaConCube , well, invitation flow is already in my app, i tried with public group. and push all method for adding new occupants but look i am getting below error, why? I/flutter ( 7130): REQUEST below group is created my another user as public group , and as per above code i am trying to add user in that public group , which should work , right? POST https://api.connectycube.com/chat/Dialog |
no, please read our doc first https://developers.connectycube.com/server/chat?id=roles-and-privileges |
ok got it, trying to fetch old messages in public group but getting this error @TatankaConCube I/flutter ( 7130): CB-SDK: : ========================================================= |
this is the code /// Get All Messages of user
} /// Get Messages by date
} |
could you please print to the console output of |
@TatankaConCube yes getting occupantsIds= [] as empty, can u provide me the proper way for this?, Even in ur demo project public group concept i not found. |
@richanshah please read our documentation https://developers.connectycube.com/flutter/messaging?id=retrieve-public-dialog-occupants |
@TatankaConCube , why in ur sample public group is not included? can u please add in sample |
we provided samples to demonstrate how to work with the most popular APIs of our SDKs, we can't add all possible functionality to the app. we try to cover all our APIs with documentation to simplify the using of it by developers |
@TatankaConCube , With public group tried
i have tried this but getting error @TatankaConCube https://api.connectycube.com/chat/Dialog/651bd626ecbe27002ffa55a7/occupants |
@TatankaConCube , how can i delete public dialogs ? who has ownership ? DELETE https://api.connectycube.com/chat/Dialog/6516a87becbe27002ff94d22 i tried this api, it gives success but it doesn't delete dialog from api |
is your user a member of this dialog? was it joined to dialog before?
in your example you delete dialog for current user only, you need to use the parameter the users' permissions I provided before in this thread above #311 (comment) |
yes already joined and also did chat |
could you please provide the full log which contains the joining flow and the requests of the participants (without any cutting and filtering) |
is this public dialog? |
YES |
that is difficult |
then try to do it with parts, I just need to see the same dialog id in all requests (join, get occupants, etc.) |
@TatankaConCube Can u help me to find out why this happens
|
@TatankaConCube , I have feature when user gets invites of joining group. in here I tried to find dialog with custom paramter feild groupuuid but the problem is In this user dialog is not currently exist so i am not able to find same diaog and add user into this.
is there any code or functonality which can help me to complete this feature ?
getDialogs: {currentPage: null, totalEntries: 16, perPage: null, skip: 0, limit: 100, items: [{_id: 651674bbecbe27002ff9411f, last_message: null, last_message_date_sent: null, last_message_user_id: null, photo: https://main-court-demo122136-dev.s3.amazonaws.com/public/Group/1695970483654298/1695970483654298.jpg, user_id: 10909924, xmpp_room_jid: 7266_651674bbecbe27002ff9411f@muc.chat.connectycube.com, unread_messages_count: 0, name: we3, type: 2, description: null, occupants_count: 2, occupants_ids: [10909837, 10909924], pinned_messages_ids: [], admins_ids: [], data: {groupUuid: 06e3c452-624e-4f13-818a-6ced5c536b16, class_name: CUSTOM_DIALOG_PARAMS}, last_message_status: null, last_message_id: null, is_e2ee: false, is_muted: false, id: null, created_at: 2023-09-29T06:54:51.000Z, updated_at: 2023-09-29T06:59:30.000Z}, {_id: 65166f41ecbe27002ff940a1, last_message: null, last_message_date_sent: null, last_message_user_id: null, photo: /, user_id: 10909837, xmpp_room_jid: 7266_65166f41ecbe27002ff940a1@
I CB-SDK: : _createDialog with user= null
I CB-SDK: : =========================================================
I === REQUEST ==== f2da1dfb-20da-49cf-8870-234debe3eaa9 ===
I REQUEST
I PUT https://api.connectycube.com/chat/Dialog/
I HEADERS
I {Content-type: application/json, ConnectyCube-REST-API-Version: 0.1.1, CB-SDK: Flutter 2.8.0, CB-Token: 4BBDBF006350CC77F9C8E350DE81787922A2}
I BODY
I {"push_all":{"occupants_ids":[10909837]}}
I
I CB-SDK: : *********************************************************
I *** RESPONSE *** 404 *** f2da1dfb-20da-49cf-8870-234debe3eaa9 ***
I HEADERS
I {connection: keep-alive, content-type: text/plain; charset=utf-8, date: Fri, 29 Sep 2023 07:15:15 GMT, strict-transport-security: max-age=15768000; includeSubDomains, server: nginx/1.25.0, content-length: 67}
I BODY
I HttpException: E_ROUTE_NOT_FOUND: Route not found PUT /chat/Dialog/
I
I CB-SDK: : updateDialogInfo error ResponseException: 404: HttpException:
I need to find dialog which doesnt exist in this user but in connectycube
The text was updated successfully, but these errors were encountered: