Skip to content
This repository has been archived by the owner on Dec 25, 2024. It is now read-only.

Commit

Permalink
CreateAsync(...) in MessagesServiceClient should return Message and n…
Browse files Browse the repository at this point in the history
…ot MessageCreateReponse (#128)
  • Loading branch information
mburumaxwell authored Sep 12, 2022
1 parent 6ccedc1 commit 290bd86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 27 deletions.
23 changes: 0 additions & 23 deletions src/FaluSdk/Messages/MessageCreateResponse.cs

This file was deleted.

8 changes: 4 additions & 4 deletions src/FaluSdk/Messages/MessagesServiceClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ public virtual Task<ResourceResponse<Message>> GetAsync(string id,
/// <param name="options">Options to use for the request.</param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public virtual Task<ResourceResponse<MessageCreateResponse>> CreateAsync(MessageCreateRequest message,
RequestOptions? options = null,
CancellationToken cancellationToken = default)
public virtual Task<ResourceResponse<Message>> CreateAsync(MessageCreateRequest message,
RequestOptions? options = null,
CancellationToken cancellationToken = default)
{
if (message is null) throw new ArgumentNullException(nameof(message));
message.Template?.Model?.GetType().EnsureAllowedForMessageTemplateModel();

return CreateResourceAsync<MessageCreateResponse>(message, options, cancellationToken);
return CreateResourceAsync<Message>(message, options, cancellationToken);
}

/// <summary>Update a message.</summary>
Expand Down

0 comments on commit 290bd86

Please sign in to comment.