Process incoming story messages

This commit is contained in:
Josh Perez 2022-03-04 16:14:52 -05:00 committed by GitHub
parent df7cdfacc7
commit eb91eb6fec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
84 changed files with 4382 additions and 652 deletions

View file

@ -129,6 +129,12 @@ export function isOutgoing(
return message.type === 'outgoing';
}
export function isStory(
message: Pick<MessageWithUIFieldsType, 'type'>
): boolean {
return message.type === 'story';
}
export function hasErrors(
message: Pick<MessageWithUIFieldsType, 'errors'>
): boolean {
@ -1502,7 +1508,9 @@ function canReplyOrReact(
);
}
if (isIncoming(message)) {
// If we get past all the other checks above then we can always reply or
// react if the message type is "incoming" | "story"
if (isIncoming(message) || isStory(message)) {
return true;
}