Fix blocking the same way, too.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4602 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
4cedc54d2d
commit
b087a09d37
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "tildefriends-app",
|
"type": "tildefriends-app",
|
||||||
"emoji": "🐌",
|
"emoji": "🐌",
|
||||||
"previous": "&JKRKYoQgzxByd80DTQQVWoDfoEd27h2jhaUrNXAGK7k=.sha256"
|
"previous": "&qvm+scemENl4DobpOoh/UyILGvvx5NbcPJKTU3CswSE=.sha256"
|
||||||
}
|
}
|
@ -40,12 +40,20 @@ class TfProfileElement extends LitElement {
|
|||||||
SELECT json_extract(content, '$.following') AS following
|
SELECT json_extract(content, '$.following') AS following
|
||||||
FROM messages WHERE author = ? AND
|
FROM messages WHERE author = ? AND
|
||||||
json_extract(content, '$.type') = 'contact' AND
|
json_extract(content, '$.type') = 'contact' AND
|
||||||
json_extract(content, '$.contact') = ?
|
json_extract(content, '$.contact') = ? AND
|
||||||
|
following IS NOT NULL
|
||||||
ORDER BY sequence DESC LIMIT 1
|
ORDER BY sequence DESC LIMIT 1
|
||||||
`, [this.whoami, this.id]);
|
`, [this.whoami, this.id]);
|
||||||
console.log(result);
|
|
||||||
this.following = result?.[0]?.following ?? false;
|
this.following = result?.[0]?.following ?? false;
|
||||||
console.log('FOLLOWING', this.whoami, this.id, this.following);
|
result = await tfrpc.rpc.query(`
|
||||||
|
SELECT json_extract(content, '$.blocking') AS blocking
|
||||||
|
FROM messages WHERE author = ? AND
|
||||||
|
json_extract(content, '$.type') = 'contact' AND
|
||||||
|
json_extract(content, '$.contact') = ? AND
|
||||||
|
blocking IS NOT NULL
|
||||||
|
ORDER BY sequence DESC LIMIT 1
|
||||||
|
`, [this.whoami, this.id]);
|
||||||
|
this.blocking = result?.[0]?.blocking ?? false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user