fix: exempt existing DM members from friend check in createGroup
When converting a 1-on-1 DM to a group, the existing DM partner was incorrectly required to be your friend. DMs don't require friendship, so this check was over-strict. Added fromDmChannelId parameter to createGroup — existing members of the source DM are exempt from the friendship validation.
This commit is contained in:
@@ -107,7 +107,7 @@ export function AddDmMemberModal() {
|
||||
homeInstance: f.homeInstance,
|
||||
})),
|
||||
];
|
||||
const newChannel = await api.dm.createGroup({ users });
|
||||
const newChannel = await api.dm.createGroup({ users, fromDmChannelId: dmChannelId });
|
||||
addDmChannel(newChannel);
|
||||
closeModal();
|
||||
navigate(`/channels/@me/${newChannel.id}`);
|
||||
|
||||
Reference in New Issue
Block a user