Bugfix: Did not count characters in content warnings, resulted in lost messages.
fixes #1
This commit is contained in:
parent
78ec9a447d
commit
4710021393
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 3.6)
|
cmake_minimum_required (VERSION 3.6)
|
||||||
project (mastorss
|
project (mastorss
|
||||||
VERSION 0.7.4
|
VERSION 0.7.5
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ std::vector<Mastodon::Easy::Status> parse_website(const string &xml)
|
||||||
content = std::regex_replace(content, std::regex("##"), "#");
|
content = std::regex_replace(content, std::regex("##"), "#");
|
||||||
|
|
||||||
uint16_t appendix_size = config[profile]["append"].asString().length();
|
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))
|
> static_cast<std::uint16_t>(max_size - 4))
|
||||||
{
|
{
|
||||||
content.resize((max_size - link.size() - appendix_size - 4));
|
content.resize((max_size - link.size() - appendix_size - 4));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user