From a6227a66790db29c2cc3865bbb2c90bf1e1e4c0b Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 23 May 2024 16:53:25 +0200 Subject: [PATCH] fix: regex, because it's always regex --- src/server/outbox.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/outbox.rs b/src/server/outbox.rs index 212ad20..6131b59 100644 --- a/src/server/outbox.rs +++ b/src/server/outbox.rs @@ -14,7 +14,8 @@ impl apb::server::Outbox for Context { type Activity = serde_json::Value; async fn create_note(&self, uid: String, object: serde_json::Value) -> crate::Result { - let re = regex::Regex::new(r"@(\w+)@(\w+)").expect("failed compiling regex pattern"); + // TODO regex hell, here i come... + let re = regex::Regex::new(r"@(.+)@([^ ]+)").expect("failed compiling regex pattern"); let raw_oid = uuid::Uuid::new_v4().to_string(); let oid = self.oid(&raw_oid); let aid = self.aid(&uuid::Uuid::new_v4().to_string());