feat: implement merge readiness plan to close gaps between v2 and v1
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 5m8s
test / unit (pull_request) Successful in 16m18s
test / integration (pull_request) Failing after 16m59s
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 5m8s
test / unit (pull_request) Successful in 16m18s
test / integration (pull_request) Failing after 16m59s
- Task 1: Fix feed response hydration by adding `to_thought_response` helper and updating feed handlers to return full `ThoughtResponse`. - Task 2: Wire follower/following REST routes for user feeds. - Task 3: Add user listing and count endpoints, including `GET /users` and `GET /users/count`. - Task 4: Implement popular tags feature with `GET /tags/popular`. - Task 5: Enhance configuration with HOST, CORS_ORIGINS, and optional rate limiting using tower-governor.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use activitypub_base::AS_PUBLIC;
|
||||
use activitypub_base::NoteType;
|
||||
use activitypub_base::AS_PUBLIC;
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use url::Url;
|
||||
@@ -27,16 +27,26 @@ pub struct ThoughtNote {
|
||||
|
||||
impl ThoughtNote {
|
||||
pub fn new_public(
|
||||
id: Url, actor_url: Url, content: String, published: DateTime<Utc>,
|
||||
in_reply_to: Option<Url>, sensitive: bool, summary: Option<String>,
|
||||
id: Url,
|
||||
actor_url: Url,
|
||||
content: String,
|
||||
published: DateTime<Utc>,
|
||||
in_reply_to: Option<Url>,
|
||||
sensitive: bool,
|
||||
summary: Option<String>,
|
||||
followers_url: Url,
|
||||
) -> Self {
|
||||
Self {
|
||||
kind: Default::default(),
|
||||
id, attributed_to: actor_url, content, published,
|
||||
id,
|
||||
attributed_to: actor_url,
|
||||
content,
|
||||
published,
|
||||
to: vec![AS_PUBLIC.to_string()],
|
||||
cc: vec![followers_url.to_string()],
|
||||
in_reply_to, sensitive, summary,
|
||||
in_reply_to,
|
||||
sensitive,
|
||||
summary,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,7 +62,9 @@ mod tests {
|
||||
"https://example.com/users/alice".parse().unwrap(),
|
||||
"Hello world".to_string(),
|
||||
chrono::Utc::now(),
|
||||
None, false, None,
|
||||
None,
|
||||
false,
|
||||
None,
|
||||
"https://example.com/users/alice/followers".parse().unwrap(),
|
||||
);
|
||||
let json = serde_json::to_string(¬e).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user