markStoryRead: More logging in unusual cases

This commit is contained in:
Alvaro 2022-10-03 17:10:20 -06:00 committed by GitHub
parent b65890b07d
commit 44db76531e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 47 additions and 9 deletions

View file

@ -72,7 +72,9 @@ export function getContact(
return window.ConversationController.get(id);
}
export function getSource(message: MessageAttributesType): string | undefined {
export function getSource(
message: Pick<MessageAttributesType, 'type' | 'source'>
): string | undefined {
if (isIncoming(message) || isStory(message)) {
return message.source;
}
@ -84,7 +86,7 @@ export function getSource(message: MessageAttributesType): string | undefined {
}
export function getSourceDevice(
message: MessageAttributesType
message: Pick<MessageAttributesType, 'type' | 'sourceDevice'>
): string | number | undefined {
const { sourceDevice } = message;
@ -101,7 +103,7 @@ export function getSourceDevice(
}
export function getSourceUuid(
message: MessageAttributesType
message: Pick<MessageAttributesType, 'type' | 'sourceUuid'>
): UUIDStringType | undefined {
if (isIncoming(message) || isStory(message)) {
return message.sourceUuid;