Fix conversation last activity calculation
This commit is contained in:
parent
aa43f322b3
commit
2db1569fbd
2 changed files with 4 additions and 4 deletions
|
@ -1899,7 +1899,7 @@
|
||||||
|
|
||||||
const currentTimestamp = this.get('timestamp') || null;
|
const currentTimestamp = this.get('timestamp') || null;
|
||||||
const timestamp = activityMessage
|
const timestamp = activityMessage
|
||||||
? activityMessage.sent_at || currentTimestamp
|
? activityMessage.get('sent_at') || currentTimestamp
|
||||||
: currentTimestamp;
|
: currentTimestamp;
|
||||||
|
|
||||||
this.set({
|
this.set({
|
||||||
|
|
|
@ -2759,8 +2759,8 @@ async function getLastConversationActivity(
|
||||||
const row = await db.get(
|
const row = await db.get(
|
||||||
`SELECT * FROM messages WHERE
|
`SELECT * FROM messages WHERE
|
||||||
conversationId = $conversationId AND
|
conversationId = $conversationId AND
|
||||||
type NOT IN ('profile-change', 'verified-change', 'message-history-unsynced') AND
|
(type IS NULL OR type NOT IN ('profile-change', 'verified-change', 'message-history-unsynced')) AND
|
||||||
json_extract(json, '$.expirationTimerUpdate.fromSync') != true
|
(json_extract(json, '$.expirationTimerUpdate.fromSync') IS NULL OR json_extract(json, '$.expirationTimerUpdate.fromSync') != 1)
|
||||||
ORDER BY received_at DESC
|
ORDER BY received_at DESC
|
||||||
LIMIT 1;`,
|
LIMIT 1;`,
|
||||||
{
|
{
|
||||||
|
@ -2781,7 +2781,7 @@ async function getLastConversationPreview(
|
||||||
const row = await db.get(
|
const row = await db.get(
|
||||||
`SELECT * FROM messages WHERE
|
`SELECT * FROM messages WHERE
|
||||||
conversationId = $conversationId AND
|
conversationId = $conversationId AND
|
||||||
type NOT IN ('profile-change', 'verified-change', 'message-history-unsynced')
|
(type IS NULL OR type NOT IN ('profile-change', 'verified-change', 'message-history-unsynced'))
|
||||||
ORDER BY received_at DESC
|
ORDER BY received_at DESC
|
||||||
LIMIT 1;`,
|
LIMIT 1;`,
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue