Correctly show co-authored videos

This commit is contained in:
Cadence Ember 2022-06-26 13:25:11 +12:00
parent 6b72622939
commit 10b38185c4
No known key found for this signature in database
GPG Key ID: BC1C2C61CF521B17
1 changed files with 4 additions and 0 deletions

View File

@ -85,6 +85,10 @@ class TimelineEntry extends TimelineBaseMethods {
* @param {import("../types").TimelineEntryN3} data
*/
applyN3(data) {
// don't apply null fields from the update over real data. this didn't used to happen, but it can happen now with a co-authored post since those have an incomplete author (triggering the update) and are no longer fetched from real N3
for (const key of Object.keys(data)) {
if (this.data[key] != null && data[key] == null) delete data[key]
}
Object.assign(this.data, data)
this.fixData()
}