(cherry picked from commit d996ed8133)
Co-authored-by: Daniel Espino García <larkox@gmail.com>
This commit is contained in:
parent
3be3a15976
commit
fc87d16578
2 changed files with 4 additions and 4 deletions
|
|
@ -116,12 +116,12 @@ const CombinedUserActivity = ({
|
|||
}
|
||||
}, [post, canDelete, isTablet, intl, location]);
|
||||
|
||||
const renderMessage = (postType: string, userIds: string[], actorId: string) => {
|
||||
const renderMessage = (postType: string, userIds: string[], actorId?: string) => {
|
||||
if (!post) {
|
||||
return null;
|
||||
}
|
||||
let actor = '';
|
||||
if (secureGetFromRecord(usernamesById, actorId)) {
|
||||
if (actorId && secureGetFromRecord(usernamesById, actorId)) {
|
||||
actor = `@${usernamesById[actorId]}`;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -389,7 +389,7 @@ export function shouldFilterJoinLeavePost(post: PostModel, showJoinLeave: boolea
|
|||
}
|
||||
|
||||
export type MessageData = {
|
||||
actorId: string;
|
||||
actorId?: string;
|
||||
postType: string;
|
||||
userIds: string[];
|
||||
}
|
||||
|
|
@ -399,7 +399,7 @@ function isMessageData(v: unknown): v is MessageData {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!('actorId' in v) || typeof v.actorId !== 'string') {
|
||||
if (('actorId' in v) && typeof v.actorId !== 'string') {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue