setPostUnreadWithHttpInfo method

Future<Response> setPostUnreadWithHttpInfo(
  1. String userId,
  2. String postId
)

Mark as unread from a post.

Mark a channel as being unread from a given post. ##### Permissions Must have read_channel permission for the channel the post is in or if the channel is public, have the read_public_channels permission for the team. Must have edit_other_users permission if the user is not the one marking the post for himself. Minimum server version: 5.18

Note: This method returns the HTTP Response.

Parameters:

  • String userId (required): User GUID

  • String postId (required): Post GUID

Implementation

Future<Response> setPostUnreadWithHttpInfo(
  String userId,
  String postId,
) async {
  // ignore: prefer_const_declarations
  final path =
      r'/users/{user_id}/posts/{post_id}/set_unread'.replaceAll('{user_id}', userId).replaceAll('{post_id}', postId);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <MmQueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>[];

  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}