Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

import com.microsoft.bot.connector.AsyncHelper;
import com.microsoft.bot.connector.ConnectorClient;
import com.microsoft.bot.connector.Conversations;
import com.microsoft.bot.connector.ExecutorFactory;
Expand Down Expand Up @@ -351,9 +350,8 @@ public ResourceResponse UpdateActivity(TurnContext context, Activity activity) {
public void DeleteActivity(TurnContext context, ConversationReference reference) {
RestConnectorClient connectorClient = context.getServices().Get("ConnectorClient");
try {
AsyncHelper.completableSingleFutureFromObservable(
connectorClient.getConversations().deleteConversationMemberAsync(
reference.getConversation().getId(), reference.getActivityId())).join();
connectorClient.getConversations().deleteConversationMemberAsync(
reference.getConversation().getId(), reference.getActivityId()).join();
} catch (CompletionException e) {
e.printStackTrace();
throw new RuntimeException(String.format("Failed deleting activity (%s)", e.toString()));
Expand Down Expand Up @@ -588,8 +586,7 @@ public CompletableFuture CreateConversation(String channelId, String serviceUrl,
}

Conversations conversations = connectorClient.getConversations();
CompletableFuture<ConversationResourceResponse> result = AsyncHelper.completableSingleFutureFromObservable(
conversations.createConversationAsync(conversationParameters));
CompletableFuture<ConversationResourceResponse> result = conversations.createConversationAsync(conversationParameters);

ConversationResourceResponse response = result.join();

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@
package com.microsoft.bot.connector;

import com.microsoft.bot.schema.AttachmentInfo;
import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.ServiceResponse;
import rx.Observable;

import java.io.InputStream;
import java.util.concurrent.CompletableFuture;

/**
* An instance of this class provides access to all the operations defined
Expand All @@ -30,18 +27,6 @@ public interface Attachments {
*/
AttachmentInfo getAttachmentInfo(String attachmentId);

/**
* GetAttachmentInfo.
* Get AttachmentInfo structure describing the attachment views.
*
* @param attachmentId attachment id
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link ServiceFuture} object
* @throws IllegalArgumentException thrown if parameters fail the validation
*/
ServiceFuture<AttachmentInfo> getAttachmentInfoAsync(String attachmentId,
final ServiceCallback<AttachmentInfo> serviceCallback);

/**
* GetAttachmentInfo.
* Get AttachmentInfo structure describing the attachment views.
Expand All @@ -50,17 +35,7 @@ ServiceFuture<AttachmentInfo> getAttachmentInfoAsync(String attachmentId,
* @return the observable to the AttachmentInfo object
* @throws IllegalArgumentException thrown if parameters fail the validation
*/
Observable<AttachmentInfo> getAttachmentInfoAsync(String attachmentId);

/**
* GetAttachmentInfo.
* Get AttachmentInfo structure describing the attachment views.
*
* @param attachmentId attachment id
* @return the observable to the AttachmentInfo object
* @throws IllegalArgumentException thrown if parameters fail the validation
*/
Observable<ServiceResponse<AttachmentInfo>> getAttachmentInfoWithServiceResponseAsync(String attachmentId);
CompletableFuture<AttachmentInfo> getAttachmentInfoAsync(String attachmentId);

/**
* GetAttachment.
Expand All @@ -74,19 +49,6 @@ ServiceFuture<AttachmentInfo> getAttachmentInfoAsync(String attachmentId,
*/
InputStream getAttachment(String attachmentId, String viewId);

/**
* GetAttachment.
* Get the named view as binary content.
*
* @param attachmentId attachment id
* @param viewId View id from attachmentInfo
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link ServiceFuture} object
* @throws IllegalArgumentException thrown if parameters fail the validation
*/
ServiceFuture<InputStream> getAttachmentAsync(String attachmentId, String viewId,
final ServiceCallback<InputStream> serviceCallback);

/**
* GetAttachment.
* Get the named view as binary content.
Expand All @@ -96,17 +58,5 @@ ServiceFuture<InputStream> getAttachmentAsync(String attachmentId, String viewId
* @return the observable to the InputStream object
* @throws IllegalArgumentException thrown if parameters fail the validation
*/
Observable<InputStream> getAttachmentAsync(String attachmentId, String viewId);

/**
* GetAttachment.
* Get the named view as binary content.
*
* @param attachmentId attachment id
* @param viewId View id from attachmentInfo
* @return the observable to the InputStream object
* @throws IllegalArgumentException thrown if parameters fail the validation
*/
Observable<ServiceResponse<InputStream>> getAttachmentWithServiceResponseAsync(String attachmentId, String viewId);

CompletableFuture<InputStream> getAttachmentAsync(String attachmentId, String viewId);
}
Loading