Refactor EncryptionGetOutgoingChannels and EncryptionChannelManager to remove UUID validation and adjust SQL query for ordering by creation date

https://github.com/nosial/Socialbox-PHP/issues/26
This commit is contained in:
netkas 2025-03-07 19:28:38 -05:00
parent 724b2ae472
commit 7165734aef
2 changed files with 1 additions and 7 deletions

View file

@ -419,7 +419,7 @@
try
{
$offset = ($page -1) * $limit;
$stmt = Database::getConnection()->prepare('SELECT * FROM encryption_channels WHERE calling_peer_address=:peer_address LIMIT :limit OFFSET :offset');
$stmt = Database::getConnection()->prepare('SELECT * FROM encryption_channels WHERE calling_peer_address=:peer_address ORDER BY created LIMIT :limit OFFSET :offset');
$stmt->bindParam(':peer_address', $peerAddress);
$stmt->bindParam(':limit', $limit);
$stmt->bindParam(':offset', $offset);