Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SlackClient.SearchFiles is not usable #106

Closed
mhgamework opened this issue Apr 21, 2017 · 1 comment
Closed

SlackClient.SearchFiles is not usable #106

mhgamework opened this issue Apr 21, 2017 · 1 comment
Assignees
Milestone

Comments

@mhgamework
Copy link

mhgamework commented Apr 21, 2017

The SlackClient.SearchFiles returns a SearchResponseFiles, which does not publicly expose the "files" field.
Furthermore, the SearchResponseFiles class has a private field "messages" which does not seem to make sense.

The SearchResponseFiles.cs file can be fixed by adding a public "files" field and remove the "messages field". I suggest this is merged into the project.
I currently use a workaround, where i copied the SlackClient.SearchFiles and have it use my own SearchResponseFiles class.

Corrected code:

[RequestPath("search.files")]
public class SearchResponseFiles : Response
{
    public string query;
    public SearchResponseFilesContainer files; // files, not messages AND public
}

public class SearchResponseFilesContainer
{
    /// <summary>
    /// Can be null if used in the context of search.all
    /// Please use paging.total instead.
    /// </summary>
    public int total;
    public PaginationInformation paging;
    public File[] matches;
}
@gpailler
Copy link
Collaborator

gpailler commented Nov 7, 2018

1.0.7 released

@gpailler gpailler closed this as completed Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants