Add users to group summary using new API

This commit is contained in:
Luke Barnard 2017-09-20 16:32:02 +01:00
parent 44c38652ab
commit 1c1bf82c2a
2 changed files with 12 additions and 10 deletions

View file

@ -195,7 +195,14 @@ module.exports = React.createClass({
searchError: null,
});
MatrixClientPeg.get().getGroupUsers(this.props.groupId).then((resp) => {
this._processResults(resp.chunk, query);
const results = resp.chunk.map((u) => {
return {
user_id: u.user_id,
avatar_url: u.avatar_url,
display_name: u.displayname,
};
});
this._processResults(results, query);
}).catch((err) => {
console.error('Error whilst searching user directory: ', err);
this.setState({