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

@ -8,7 +8,12 @@ import type {
import { getSource, getSourceDevice, getSourceUuid } from '../messages/helpers';
import { isDirectConversation, isGroupV2 } from './whatTypeOfConversation';
export function getMessageIdForLogging(message: MessageAttributesType): string {
export function getMessageIdForLogging(
message: Pick<
MessageAttributesType,
'type' | 'sourceUuid' | 'sourceDevice' | 'sent_at'
>
): string {
const account = getSourceUuid(message) || getSource(message);
const device = getSourceDevice(message);
const timestamp = message.sent_at;