Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix views processing hour 0

Chocobozzzcc49be3e3547
diff --git a/server/lib/redis.ts b/server/lib/redis.ts
index 4325598b2f..257cce1418 100644
--- a/server/lib/redis.ts
+++ b/server/lib/redis.ts
@@ -215,7 +215,7 @@ class Redis {
}
private generateVideoViewKey (videoId: number, hour?: number) {
- if (!hour) hour = new Date().getHours()
+ if (hour === undefined || hour === null) hour = new Date().getHours()
return `video-view-${videoId}-h${hour}`
}