Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(signal) update to recent db schema(11, Jun2024) #451

Merged
merged 1 commit into from
Aug 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions src/promnesia/sources/signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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,
Expand All @@ -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
Expand Down
Loading