markStoryRead: More logging in unusual cases
This commit is contained in:
parent
b65890b07d
commit
44db76531e
8 changed files with 47 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue