Skip to content

Commit

Permalink
Adding Conversations.Mark method
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Oxtoby committed Jul 12, 2020
1 parent 53aaa2f commit d693f6c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions SlackNet/WebApi/ConversationsApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ public interface IConversationsApi
/// <param name="cancellationToken"></param>
Task<ConversationListResponse> List(bool excludeArchived = false, int limit = 100, IEnumerable<ConversationType> types = null, string cursor = null, CancellationToken? cancellationToken = null);

/// <summary>
/// Sets the read cursor in a channel.
/// </summary>
/// <param name="channelId">Channel or conversation to set the read cursor for.</param>
/// <param name="messageTs">Unique identifier of message you want marked as most recently seen in this conversation.</param>
/// <param name="cancellationToken"></param>
Task Mark(string channelId, string messageTs, CancellationToken? cancellationToken = null);

/// <summary>
/// Retrieve members of a conversation.
/// </summary>
Expand Down Expand Up @@ -338,6 +346,19 @@ public Task<ConversationListResponse> List(bool excludeArchived = false, int lim
{ "types", types }
}, cancellationToken);

/// <summary>
/// Sets the read cursor in a channel.
/// </summary>
/// <param name="channelId">Channel or conversation to set the read cursor for.</param>
/// <param name="messageTs">Unique identifier of message you want marked as most recently seen in this conversation.</param>
/// <param name="cancellationToken"></param>
public Task Mark(string channelId, string messageTs, CancellationToken? cancellationToken = null) =>
_client.Post("conversations.mark", new Args
{
{ "channel", channelId },
{ "ts", messageTs }
}, cancellationToken);

/// <summary>
/// Retrieve members of a conversation.
/// </summary>
Expand Down

0 comments on commit d693f6c

Please sign in to comment.