If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.
New contributors please see our Developer's Guide.
Notes: Jira ticket
It would be useful for plugins to be able to get a list of ChannelMembers and TeamMembers for a specific user. This could be used to page through all the channels/teams a user is on.
Add the following plugin API methods
GetTeamMembersForUser(userId string, page int, perPage int) ([]*model.TeamMember, *model.AppError)GetChannelMembersForUser(teamId string, userId string, page int, perPage int) ([]*model.ChannelMember, *model.AppError)You may need to modify or add some app and store package functions to handle the paging.
Read about adding to the plugin API here https://developers.mattermost.com/contribute/server/plugins/.
You'll want to look at these files:
If you have any questions or would like feedback, feel free to ask in the Developer Toolkit channel on our Mattermost community instance.
I can take this.
Thanks @gupsho! :+1:
@hanzei, @jwilander just to confirm,
GetTeamMembersForUser would return all TeamMembers for a user across all the teams that user is on?
and
GetChannelMembersForUser would return all ChannelMembers for a user across all the channels user is on for a particular team?
That's correct @gupsho 馃憤
Hey @gupsho,
just want to check if you have any questions?
Not right now. Still working on it. Will have PR out soon. Thanks for checking.