mirror of
https://github.com/kevachat/geminiapp.git
synced 2025-03-13 05:51:39 +00:00
include pending data from pool
This commit is contained in:
parent
6e70267a34
commit
1954f831cf
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user