mmcs-quotes-bridge/posts.h

24 lines
558 B
C++

#pragma once
#include "config.h"
#include <string>
#include <string_view>
namespace posts {
enum PostSource {
SRC_VK, SRC_TELEGRAM
};
struct AbstractPost {
inline AbstractPost(PostSource srcType, int src, long id, long date, std::string text) : sourceType(srcType), source(src), id(id), date(date), text(text) {}
long id;
long date;
std::string text;
PostSource sourceType;
int source;
};
bool filter_and_transform(AbstractPost &post);
std::string_view add_signature(AbstractPost &post, config::AppConfig *cfg);
}