diff --git a/apps/ssb.json b/apps/ssb.json index 1756cbec0..9ac40d61a 100644 --- a/apps/ssb.json +++ b/apps/ssb.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "🦀", - "previous": "&A1H5/wFzj8lTt2HBBb8Gj6tQnx+c2y0LvJnDvZqy10Y=.sha256" + "previous": "&dG2winiXQktKgYn8MEX+K7HUtY7PfYh1a9L9IVdCrtM=.sha256" } diff --git a/apps/ssb/tf-app.js b/apps/ssb/tf-app.js index 2c57625fd..8b9df515b 100644 --- a/apps/ssb/tf-app.js +++ b/apps/ssb/tf-app.js @@ -385,7 +385,7 @@ class TfElement extends LitElement { ); for (let message of result) { let key = JSON.stringify( - message?.decrypted?.recps?.filter((x) => x != this.whoami)?.sort() + message?.decrypted?.recps?.filter((x) => x != this.whoami)?.sort() ?? [] ); if (!groups[key]) { groups[key] = []; diff --git a/apps/ssb/tf-tab-news-feed.js b/apps/ssb/tf-tab-news-feed.js index 85cc7ad61..7927ecdca 100644 --- a/apps/ssb/tf-tab-news-feed.js +++ b/apps/ssb/tf-tab-news-feed.js @@ -209,27 +209,8 @@ class TfTabNewsFeedElement extends LitElement { console.log( `load of ${result.length} rows took ${(t2 - t0) / 1000} (${(t1 - t0) / 1000} to find ${initial_messages.length} initial messages, ${(t2 - t1) / 1000} to find ${result.length} total messages) following=${this.following.length} st=${start_time} et=${end_time}` ); - } else if (this.hash == '#🔐') { - result = await tfrpc.rpc.query( - ` - SELECT TRUE AS is_primary, messages.rowid, messages.id, previous, author, sequence, timestamp, hash, json(content) AS content, signature - FROM messages - JOIN json_each(?1) AS private_messages ON messages.id = private_messages.value - WHERE - (?2 IS NULL OR (messages.timestamp >= ?2)) AND messages.timestamp < ?3 AND - json(messages.content) LIKE '"%' - ORDER BY messages.rowid DESC LIMIT ?4 - `, - [ - JSON.stringify(this.private_messages), - start_time, - end_time, - k_max_results, - ] - ); - result = (await this.decrypt(result)).filter((x) => x.decrypted); } else if (this.hash.startsWith('#🔐')) { - let ids = this.hash.substring('#🔐'.length).split(','); + let ids = this.hash == '#🔐' ? [] : this.hash.substring('#🔐'.length).split(','); result = await tfrpc.rpc.query( ` SELECT TRUE AS is_primary, messages.rowid, messages.id, previous, author, sequence, timestamp, hash, json(content) AS content, signature