Stories: Don't drop 1:1 replies, always 24-hour expireTimer
This commit is contained in:
parent
383a0fd17f
commit
380833447f
2 changed files with 11 additions and 7 deletions
|
@ -2422,9 +2422,13 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
findStoryMessage(conversation.id, initialMessage.storyContext),
|
||||
]);
|
||||
|
||||
if (initialMessage.storyContext && !storyQuote) {
|
||||
if (
|
||||
initialMessage.storyContext &&
|
||||
!storyQuote &&
|
||||
!isDirectConversation(conversation.attributes)
|
||||
) {
|
||||
log.warn(
|
||||
`handleDataMessage/${idLog}: Received storyContext message but no matching story. Dropping.`
|
||||
`handleDataMessage/${idLog}: Received storyContext message in group but no matching story. Dropping.`
|
||||
);
|
||||
|
||||
confirm();
|
||||
|
|
|
@ -1942,12 +1942,12 @@ export default class MessageReceiver
|
|||
return;
|
||||
}
|
||||
|
||||
const expireTimer = Math.min(
|
||||
Math.floor((envelope.timestamp + durations.DAY - Date.now()) / 1000),
|
||||
durations.DAY / 1000
|
||||
const timeRemaining = Math.min(
|
||||
Math.floor(envelope.timestamp + durations.DAY - Date.now()),
|
||||
durations.DAY
|
||||
);
|
||||
|
||||
if (expireTimer <= 0) {
|
||||
if (timeRemaining <= 0) {
|
||||
log.info(
|
||||
'MessageReceiver.handleStoryMessage: story already expired',
|
||||
logId
|
||||
|
@ -1959,7 +1959,7 @@ export default class MessageReceiver
|
|||
const message: ProcessedDataMessage = {
|
||||
attachments,
|
||||
canReplyToStory: Boolean(msg.allowsReplies),
|
||||
expireTimer,
|
||||
expireTimer: durations.DAY / 1000,
|
||||
flags: 0,
|
||||
groupV2,
|
||||
isStory: true,
|
||||
|
|
Loading…
Add table
Reference in a new issue