fix(MutualGroupDMs): properly pass props (#2457)

Co-authored-by: vee <vendicated@riseup.net>
main
Amia 6 months ago committed by GitHub
parent 9621dc7bb3
commit bd6f9e6f32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -56,12 +56,12 @@ export default definePlugin({
find: ".UserProfileSections.USER_INFO_CONNECTIONS:",
replacement: {
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 => (
<Clickable
className={ProfileListClasses.listRow}

Loading…
Cancel
Save