From dbce486c9be93d19ebbfac97e46d107b77b1c336 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 14 Jul 2019 17:59:12 +0200 Subject: [PATCH] Blocked Kiwi Farms, added explanation in README. --- README.adoc | 7 +++++++ src/mastodon-cpp.cpp | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.adoc b/README.adoc index 1e936e7..d4cdab4 100644 --- a/README.adoc +++ b/README.adoc @@ -479,6 +479,13 @@ strings and you can use unsupported fields in an `Entity` by converting it to ** [ ] Source ** [ ] Notification +== Blocked instances + +Instances that exist mainly to hurt people are blocked from using this library. + +.List of blocked instances: +* https://en.wikipedia.org/wiki/Gab_(social_network)[Gab] +* https://en.wikipedia.org/wiki/Kiwi_Farms[Kiwi Farms] == Copyright diff --git a/src/mastodon-cpp.cpp b/src/mastodon-cpp.cpp index a047ad6..77d4f27 100644 --- a/src/mastodon-cpp.cpp +++ b/src/mastodon-cpp.cpp @@ -40,8 +40,9 @@ API::API(const string &instance, const string &access_token) { bool fash = false; const std::regex re_gab("(?:\\.|^)gab\\.[^\\.]+$"); + const std::regex re_kiwifarms("(?:\\.|^)kiwifarms\\.[^\\.]+$"); - for (const std::regex &re : { re_gab }) + for (const std::regex &re : { re_gab, re_kiwifarms }) { if (std::regex_search(_instance, re)) {