From c3f0ab72b7191d1f0802e6876ff576793523a29e Mon Sep 17 00:00:00 2001 From: Kostis Anagnostopoulos Date: Wed, 19 Jun 2024 19:21:47 +0300 Subject: [PATCH] fix(signal) update to recent db schema(11, Jun2024) --- src/promnesia/sources/signal.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/promnesia/sources/signal.py b/src/promnesia/sources/signal.py index daafd0f7..6fdd22c5 100644 --- a/src/promnesia/sources/signal.py +++ b/src/promnesia/sources/signal.py @@ -108,12 +108,18 @@ def index( SELECT id, type, - coalesce(name, profileName, profileFamilyName, e164) as aname, + coalesce( + profileFullName, + profileName, + name, + profileFamilyName, + e164 + ) as aname, name, profileName, profileFamilyName, e164, - uuid + serviceId FROM conversations ), Msgs AS ( @@ -125,8 +131,8 @@ def index( M.received_at, M.sent_at ) AS timestamp, - IIF(M.type = "outgoing", - "Me (" || C2.aname || ")", + IIF(M.type = 'outgoing', + 'Me (' || C2.aname || ')', C2.aname ) AS sender, M.conversationId AS cid, @@ -140,7 +146,7 @@ def index( INNER JOIN Cons AS C1 ON M.conversationId = C1.id INNER JOIN Cons AS C2 - ON M.sourceUuid = C2.uuid + ON M.sourceServiceId = C2.serviceId ) SELECT id, timestamp, sender, cid, chatname, body FROM Msgs