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),
|
findStoryMessage(conversation.id, initialMessage.storyContext),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (initialMessage.storyContext && !storyQuote) {
|
if (
|
||||||
|
initialMessage.storyContext &&
|
||||||
|
!storyQuote &&
|
||||||
|
!isDirectConversation(conversation.attributes)
|
||||||
|
) {
|
||||||
log.warn(
|
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();
|
confirm();
|
||||||
|
|
|
@ -1942,12 +1942,12 @@ export default class MessageReceiver
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const expireTimer = Math.min(
|
const timeRemaining = Math.min(
|
||||||
Math.floor((envelope.timestamp + durations.DAY - Date.now()) / 1000),
|
Math.floor(envelope.timestamp + durations.DAY - Date.now()),
|
||||||
durations.DAY / 1000
|
durations.DAY
|
||||||
);
|
);
|
||||||
|
|
||||||
if (expireTimer <= 0) {
|
if (timeRemaining <= 0) {
|
||||||
log.info(
|
log.info(
|
||||||
'MessageReceiver.handleStoryMessage: story already expired',
|
'MessageReceiver.handleStoryMessage: story already expired',
|
||||||
logId
|
logId
|
||||||
|
@ -1959,7 +1959,7 @@ export default class MessageReceiver
|
||||||
const message: ProcessedDataMessage = {
|
const message: ProcessedDataMessage = {
|
||||||
attachments,
|
attachments,
|
||||||
canReplyToStory: Boolean(msg.allowsReplies),
|
canReplyToStory: Boolean(msg.allowsReplies),
|
||||||
expireTimer,
|
expireTimer: durations.DAY / 1000,
|
||||||
flags: 0,
|
flags: 0,
|
||||||
groupV2,
|
groupV2,
|
||||||
isStory: true,
|
isStory: true,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue