You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-17 17:42:41 +03:00
getPublicGroups->getPublicisedGroups
To match dbkrs js-sdk wrappers for flair: matrix-org/matrix-js-sdk/pull#542
This commit is contained in:
@@ -47,7 +47,7 @@ const usersPending = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let debounceTimeoutID;
|
let debounceTimeoutID;
|
||||||
function getPublicGroupsCached(matrixClient, userId) {
|
function getPublicisedGroupsCached(matrixClient, userId) {
|
||||||
if (userGroups[userId]) {
|
if (userGroups[userId]) {
|
||||||
return Promise.resolve(userGroups[userId]);
|
return Promise.resolve(userGroups[userId]);
|
||||||
}
|
}
|
||||||
@@ -96,7 +96,7 @@ async function batchedGetPublicGroups(matrixClient) {
|
|||||||
users: [],
|
users: [],
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
resp = await matrixClient.getPublicGroups(usersInFlight);
|
resp = await matrixClient.getPublicisedGroups(usersInFlight);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// Propagate the same error to all usersInFlight
|
// Propagate the same error to all usersInFlight
|
||||||
usersInFlight.forEach((userId) => {
|
usersInFlight.forEach((userId) => {
|
||||||
@@ -157,7 +157,7 @@ export default class Flair extends React.Component {
|
|||||||
async _generateAvatars() {
|
async _generateAvatars() {
|
||||||
let groups;
|
let groups;
|
||||||
try {
|
try {
|
||||||
groups = await getPublicGroupsCached(this.context.matrixClient, this.props.userId);
|
groups = await getPublicisedGroupsCached(this.context.matrixClient, this.props.userId);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Could not get groups for user', this.props.userId, err);
|
console.error('Could not get groups for user', this.props.userId, err);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user