fix get_posts returning the pinned post
This commit is contained in:
parent
e221d3624d
commit
2e543e6c48
2
vk.cpp
2
vk.cpp
@ -72,7 +72,7 @@ void VKClient::get_posts(std::variant<long, std::string> wall, int offset, int c
|
|||||||
for (auto post : responsePayload["items"]) {
|
for (auto post : responsePayload["items"]) {
|
||||||
if (checkedPosts == requestedCount) continue;
|
if (checkedPosts == requestedCount) continue;
|
||||||
++checkedPosts;
|
++checkedPosts;
|
||||||
if (post.contains("is_pinned") && post["is_pinned"] == true) continue;
|
if (post.contains("is_pinned") && post["is_pinned"] == 1) continue;
|
||||||
if (!post.contains("id") || !post.contains("date") || !post.contains("from_id") || !post.contains("type") || !post.contains("text")) {
|
if (!post.contains("id") || !post.contains("date") || !post.contains("from_id") || !post.contains("type") || !post.contains("text")) {
|
||||||
m_logger->warn("strange post: {}", post.dump());
|
m_logger->warn("strange post: {}", post.dump());
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user