ssb: Fix an issue with loading directly into private messages.
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled

This commit is contained in:
2025-08-13 19:58:02 -04:00
parent f378db6c6f
commit e1f3dc6ae4
2 changed files with 7 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
{ {
"type": "tildefriends-app", "type": "tildefriends-app",
"emoji": "🦀", "emoji": "🦀",
"previous": "&K4alfggWhsPlQs0PMLJqvpm03SFmcDs1xlVwnwYCS4k=.sha256" "previous": "&A1H5/wFzj8lTt2HBBb8Gj6tQnx+c2y0LvJnDvZqy10Y=.sha256"
} }

View File

@@ -410,7 +410,9 @@ class TfTabNewsFeedElement extends LitElement {
this._messages_hash = this.hash; this._messages_hash = this.hash;
} }
this._messages_following = JSON.stringify(this.following); this._messages_following = JSON.stringify(this.following);
this._private_messages = JSON.stringify(this.private_messages); this._private_messages =
JSON.stringify(this.private_messages) +
JSON.stringify(this.grouped_private_messages);
let now = new Date().valueOf(); let now = new Date().valueOf();
let start_time = now - 24 * 60 * 60 * 1000; let start_time = now - 24 * 60 * 60 * 1000;
this.start_time = start_time; this.start_time = start_time;
@@ -454,7 +456,9 @@ class TfTabNewsFeedElement extends LitElement {
!this.messages || !this.messages ||
this._messages_hash !== this.hash || this._messages_hash !== this.hash ||
this._messages_following !== JSON.stringify(this.following) || this._messages_following !== JSON.stringify(this.following) ||
this._private_messages !== JSON.stringify(this.private_messages) this._private_messages !==
JSON.stringify(this.private_messages) +
JSON.stringify(this.grouped_private_messages)
) { ) {
console.log( console.log(
`loading messages for ${this.whoami} (following ${this.following.length})` `loading messages for ${this.whoami} (following ${this.following.length})`