chore: add typecheck to data.from and data.to when creating the inviteV4 (#3257)
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
parent
f203523b75
commit
1591350144
1 changed files with 2 additions and 2 deletions
|
|
@ -182,8 +182,8 @@ class Message extends Base {
|
||||||
inviteCodeExp: data.inviteCodeExp,
|
inviteCodeExp: data.inviteCodeExp,
|
||||||
groupId: data.inviteGrp,
|
groupId: data.inviteGrp,
|
||||||
groupName: data.inviteGrpName,
|
groupName: data.inviteGrpName,
|
||||||
fromId: '_serialized' in data.from ? data.from._serialized : data.from,
|
fromId: typeof data.from === 'object' && '_serialized' in data.from ? data.from._serialized : data.from,
|
||||||
toId: '_serialized' in data.to ? data.to._serialized : data.to
|
toId: typeof data.to === 'object' && '_serialized' in data.to ? data.to._serialized : data.to
|
||||||
} : undefined;
|
} : undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue