fix(MutualGroupDMs): properly pass props (#2457)
Co-authored-by: vee <vendicated@riseup.net>
This commit is contained in:
parent
9621dc7bb3
commit
bd6f9e6f32
1 changed files with 2 additions and 2 deletions
|
@ -56,12 +56,12 @@ export default definePlugin({
|
||||||
find: ".UserProfileSections.USER_INFO_CONNECTIONS:",
|
find: ".UserProfileSections.USER_INFO_CONNECTIONS:",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<={user:(\i),onClose:(\i)}\);)(?=case \i\.\i\.MUTUAL_FRIENDS)/,
|
match: /(?<={user:(\i),onClose:(\i)}\);)(?=case \i\.\i\.MUTUAL_FRIENDS)/,
|
||||||
replace: "case \"MUTUAL_GDMS\":return $self.renderMutualGDMs($1,$2);"
|
replace: "case \"MUTUAL_GDMS\":return $self.renderMutualGDMs({user: $1, onClose: $2});"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
renderMutualGDMs: ErrorBoundary.wrap((user: User, onClose: () => void) => {
|
renderMutualGDMs: ErrorBoundary.wrap(({ user, onClose }: { user: User, onClose: () => void; }) => {
|
||||||
const entries = ChannelStore.getSortedPrivateChannels().filter(c => c.isGroupDM() && c.recipients.includes(user.id)).map(c => (
|
const entries = ChannelStore.getSortedPrivateChannels().filter(c => c.isGroupDM() && c.recipients.includes(user.id)).map(c => (
|
||||||
<Clickable
|
<Clickable
|
||||||
className={ProfileListClasses.listRow}
|
className={ProfileListClasses.listRow}
|
||||||
|
|
Loading…
Reference in a new issue