Browse Source

ignore system channel when figuring out initial last id

Andrew Dolgov 3 years ago
parent
commit
2ca09e1fae
1 changed files with 2 additions and 1 deletions
  1. 2 1
      include/functions.php

+ 2 - 1
include/functions.php

@@ -621,7 +621,8 @@
 			FROM ttirc_messages, ttirc_connections
 			WHERE
 				owner_uid = ".$_SESSION["uid"]." AND
-				connection_id = ttirc_connections.id
+				connection_id = ttirc_connections.id AND
+				channel != '---'
 			ORDER BY id DESC LIMIT 1 OFFSET 50");
 
 		if (db_num_rows($result) != 0) {