don't set dmUserId when not a DM
This commit is contained in:
parent
7defd4a02b
commit
45837f7377
1 changed files with 5 additions and 4 deletions
|
@ -183,10 +183,11 @@ function applyInvite(data, invite) {
|
||||||
if (data.isDirectMessage !== invite.isDirectMessage) {
|
if (data.isDirectMessage !== invite.isDirectMessage) {
|
||||||
data = data.cloneIfNeeded();
|
data = data.cloneIfNeeded();
|
||||||
data.isDirectMessage = invite.isDirectMessage;
|
data.isDirectMessage = invite.isDirectMessage;
|
||||||
}
|
if (invite.isDirectMessage) {
|
||||||
if (data.dmUserId !== invite.inviter?.userId) {
|
data.dmUserId = invite.inviter?.userId;
|
||||||
data = data.cloneIfNeeded();
|
} else {
|
||||||
data.dmUserId = invite.inviter?.userId;
|
data.dmUserId = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue