fix(feed): append @domain to handle when remote_actors stored username-only handle (old data)
This commit is contained in:
@@ -97,7 +97,11 @@ fn feed_select(viewer: Option<uuid::Uuid>) -> String {
|
|||||||
t.created_at AS thought_created_at, t.updated_at,
|
t.created_at AS thought_created_at, t.updated_at,
|
||||||
u.id AS author_id,
|
u.id AS author_id,
|
||||||
CASE WHEN NOT u.local AND ra.handle IS NOT NULL AND ra.handle != ''
|
CASE WHEN NOT u.local AND ra.handle IS NOT NULL AND ra.handle != ''
|
||||||
THEN '@' || ra.handle ELSE u.username END AS username,
|
THEN '@' || ra.handle ||
|
||||||
|
CASE WHEN ra.handle NOT LIKE '%@%'
|
||||||
|
THEN '@' || SPLIT_PART(ra.url, '/', 3)
|
||||||
|
ELSE '' END
|
||||||
|
ELSE u.username END AS username,
|
||||||
u.email, u.password_hash,
|
u.email, u.password_hash,
|
||||||
COALESCE(ra.display_name, u.display_name) AS display_name,
|
COALESCE(ra.display_name, u.display_name) AS display_name,
|
||||||
u.bio,
|
u.bio,
|
||||||
|
|||||||
Reference in New Issue
Block a user