diff --git a/main.cpp b/main.cpp index 39bbb49..63f07b0 100644 --- a/main.cpp +++ b/main.cpp @@ -9,7 +9,8 @@ #define DOMAIN_RE "(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}" // https://docs.joinmastodon.org/methods/accounts/#422-unprocessable-entity -#define USERNAME_RE "[a-zA-Z0-9_]+" +// https://akko.erincandescent.net/@postmaster-emeritus +#define USERNAME_RE "[a-zA-Z0-9\\-_]+" #define ACCT_RE USERNAME_RE "(?:@" DOMAIN_RE ")?" int main(int argc, char** argv) { diff --git a/models.cpp b/models.cpp index 0c66ea6..6ccd2b8 100644 --- a/models.cpp +++ b/models.cpp @@ -9,7 +9,8 @@ #define DOMAIN_RE "(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}" // https://docs.joinmastodon.org/methods/accounts/#422-unprocessable-entity -#define USERNAME_RE "[a-zA-Z0-9_]+" +// https://akko.erincandescent.net/@postmaster-emeritus +#define USERNAME_RE "[a-zA-Z0-9\\-_]+" using json = nlohmann::json; static time_t parse_rfc3339(const std::string& str);