optimize pre-loaded channels

This commit is contained in:
Mystikfluu
2022-08-28 22:25:35 +02:00
parent 34d3dfb0dc
commit f456ab4798
2 changed files with 10 additions and 2 deletions
+9 -1
View File
@@ -849,7 +849,15 @@ function get_channels(){
let sql = `select post_receiver_name from ipost.posts where post_is_private = '0' group by post_receiver_name;`;
con.query(sql, [], function (err, result) {
if (err)reject(err)
resolve(result)
let out = []
for(let channel of result){
if(channel.post_receiver_name == "")continue;
out[out.length] = channel.post_receiver_name
}
resolve(out)
});
})
}