Closed vinayappypiellp closed 4 years ago
@vinayappypiellp you need user id to create new chat dialog. As a solution, you can download user from server by login or e-mail, then download (or create) chat dialog by user id. Please add more information about your use-case and we will try to find better solution for it.
@TatankaConCube , my use-case is, I receive user email from an api, and i need to start chat with the email.
@vinayappypiellp for your case use API to Retrieve user by email, then use
RequestGetBuilder requestBuilder = new RequestGetBuilder();
requestBuilder.setLimit(1);
requestBuilder.in(Consts.DIALOG_OCCUPANTS, userId);
ConnectycubeRestChatService.getChatDialogs(ConnectycubeDialogType.PRIVATE, requestBuilder).performAsync(new EntityCallback<ArrayList<ConnectycubeChatDialog>>() {
@Override
public void onSuccess(ArrayList<ConnectycubeChatDialog> dialogs, Bundle params) {
ConnectycubeChatDialog targetDialog = dialogs.get(0);
}
@Override
public void onError(ResponseException exception) {
}
});
targetDialog
- chat dialog which you can use for sending messages.
feel free to open other questions if you have
Hi, Can we create new dialog with login or email only as i couldn't know occupantIds, with using roaster listener.?