@@ -56,6 +56,10 @@ type Metadata = {
56
56
pluginNames : string [ ] ;
57
57
} ;
58
58
59
+ function isTurbo ( turbo : number , turboExpiration : number ) : boolean {
60
+ return turbo === 1 || turboExpiration > Date . now ( ) / 1e3 ;
61
+ }
62
+
59
63
function getPopularity ( space : Metadata ) : number {
60
64
let popularity =
61
65
space . counts . proposalsCount / 20 +
@@ -124,7 +128,7 @@ function mapSpaces() {
124
128
name : space . name ,
125
129
verified : space . verified ,
126
130
flagged : space . flagged ,
127
- turbo : space . turbo ,
131
+ turbo : isTurbo ( space . turbo , space . turboExpiration ) ,
128
132
turboExpiration : space . turboExpiration ,
129
133
hibernated : space . hibernated ,
130
134
parent : space . parent ,
@@ -168,7 +172,7 @@ async function loadSpaces() {
168
172
...JSON . parse ( space . settings ) ,
169
173
flagged : space . flagged === 1 ,
170
174
verified : space . verified === 1 ,
171
- turbo : space . turbo === 1 ,
175
+ turbo : isTurbo ( space . turbo , space . turbo_expiration ) ,
172
176
turboExpiration : space . turbo_expiration ,
173
177
hibernated : space . hibernated === 1 ,
174
178
follower_count : space . follower_count ,
@@ -315,7 +319,7 @@ export async function getSpace(id: string) {
315
319
domain : space . domain ,
316
320
flagged : space . flagged === 1 ,
317
321
verified : space . verified === 1 ,
318
- turbo : space . turbo === 1 ,
322
+ turbo : isTurbo ( space . turbo , space . turbo_expiration ) ,
319
323
turboExpiration : space . turbo_expiration ,
320
324
hibernated : space . hibernated === 1 ,
321
325
deleted : space . deleted === 1
0 commit comments