Bugfix: Did not count characters in content warnings, resulted in lost messages.

fixes #1
This commit is contained in:
tastytea 2018-08-30 01:07:19 +02:00
parent 78ec9a447d
commit 4710021393
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.6)
project (mastorss
VERSION 0.7.4
VERSION 0.7.5
LANGUAGES CXX
)

View File

@ -164,7 +164,7 @@ std::vector<Mastodon::Easy::Status> parse_website(const string &xml)
content = std::regex_replace(content, std::regex("##"), "#");
uint16_t appendix_size = config[profile]["append"].asString().length();
if ((content.size() + link.size() + appendix_size)
if ((status.spoiler_text().size() + content.size() + link.size() + appendix_size)
> static_cast<std::uint16_t>(max_size - 4))
{
content.resize((max_size - link.size() - appendix_size - 4));