client, server: merge nearby pool posts into regular post serialization

Can still be cleaned up some more.
Need to compare speed of the get_around query vs nearby pool posts.
This commit is contained in:
Eva
2025-04-03 01:39:09 +02:00
parent 7708b4e5a3
commit 3875ec173f
8 changed files with 67 additions and 81 deletions

View File

@ -51,6 +51,22 @@ class Pool extends events.EventTarget {
return this._lastEditTime;
}
get firstPost() {
return this._firstPost;
}
get lastPost() {
return this._lastPost;
}
get previousPost() {
return this._previousPost;
}
get nextPost() {
return this._nextPost;
}
set names(value) {
this._names = value;
}
@ -169,6 +185,10 @@ class Pool extends events.EventTarget {
_creationTime: response.creationTime,
_lastEditTime: response.lastEditTime,
_postCount: response.postCount || 0,
_firstPost: response.firstPost || null,
_lastPost: response.lastPost || null,
_previousPost: response.previousPost || null,
_nextPost: response.nextPost || null,
};
for (let obj of [this, this._orig]) {