|
|
@ -149,7 +149,7 @@ class Room |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Get posts |
|
|
|
// Get saved posts |
|
|
|
$posts = []; |
|
|
|
$posts = []; |
|
|
|
|
|
|
|
|
|
|
|
foreach ($records as $record) |
|
|
|
foreach ($records as $record) |
|
|
@ -160,6 +160,34 @@ class Room |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Get pending posts |
|
|
|
|
|
|
|
foreach ((array) $this->_kevacoin->kevaPending() as $pending) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// Ignore pending posts from other rooms |
|
|
|
|
|
|
|
if ($pending['namespace'] != $namespace) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Ignore everything in pending queue but keva_put |
|
|
|
|
|
|
|
if ($pending['op'] != 'keva_put') |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Skip meta |
|
|
|
|
|
|
|
if (str_starts_with($pending['key'], '_')) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Require valid kevachat post |
|
|
|
|
|
|
|
if ($post = $this->_post($namespace, $pending['key'], $records, null, $time)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$posts[$time] = $post; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Sort posts by time |
|
|
|
// Sort posts by time |
|
|
|
krsort($posts); |
|
|
|
krsort($posts); |
|
|
|
|
|
|
|
|
|
|
|