include pending data from pool

This commit is contained in:
ghost 2024-01-27 09:40:11 +02:00
parent 6e70267a34
commit 1954f831cf

View File

@ -149,7 +149,7 @@ class Room
return null;
}
// Get posts
// Get saved posts
$posts = [];
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
krsort($posts);