@@ -87,24 +87,24 @@ pub async fn versia_user_from_db(
87
87
let url = Url :: parse ( & user. url ) ?;
88
88
let ap = user. ap_json . unwrap ( ) ;
89
89
let serialized_ap: crate :: objects:: person:: Person = serde_json:: from_str ( & ap) ?;
90
- let inbox_url = Url :: parse ( "https://ap.versia.social /apbridge/versia/inbox" ) ?;
90
+ let inbox_url = Url :: parse ( & ( "https://" . to_string ( ) + & API_DOMAIN + " /apbridge/versia/inbox") ) ?;
91
91
let outbox_url = Url :: parse (
92
- ( "https://ap.versia.social /apbridge/versia/outbox/" . to_string ( ) + & user. id ) . as_str ( ) ,
92
+ ( "https://" . to_string ( ) + & API_DOMAIN + " /apbridge/versia/outbox/" + & user. id ) . as_str ( ) ,
93
93
) ?;
94
94
let followers_url = Url :: parse (
95
- ( "https://ap.versia.social /apbridge/versia/followers/" . to_string ( ) + & user. id ) . as_str ( ) ,
95
+ ( "https://" . to_string ( ) + & API_DOMAIN + " /apbridge/versia/followers/" + & user. id ) . as_str ( ) ,
96
96
) ?;
97
97
let following_url = Url :: parse (
98
- ( "https://ap.versia.social /apbridge/versia/following/" . to_string ( ) + & user. id ) . as_str ( ) ,
98
+ ( "https://" . to_string ( ) + & API_DOMAIN + " /apbridge/versia/following/" + & user. id ) . as_str ( ) ,
99
99
) ?;
100
100
let featured_url = Url :: parse (
101
- ( "https://ap.versia.social /apbridge/versia/featured/" . to_string ( ) + & user. id ) . as_str ( ) ,
101
+ ( "https://" . to_string ( ) + & API_DOMAIN + " /apbridge/versia/featured/" + & user. id ) . as_str ( ) ,
102
102
) ?;
103
103
let likes_url = Url :: parse (
104
- ( "https://ap.versia.social /apbridge/versia/likes/" . to_string ( ) + & user. id ) . as_str ( ) ,
104
+ ( "https://" . to_string ( ) + & API_DOMAIN + " /apbridge/versia/likes/" + & user. id ) . as_str ( ) ,
105
105
) ?;
106
106
let dislikes_url = Url :: parse (
107
- ( "https://ap.versia.social /apbridge/versia/dislikes/" . to_string ( ) + & user. id ) . as_str ( ) ,
107
+ ( "https://" . to_string ( ) + & API_DOMAIN + " /apbridge/versia/dislikes/" + & user. id ) . as_str ( ) ,
108
108
) ?;
109
109
let og_displayname_ref = user. name . clone ( ) ;
110
110
let og_username_ref = user. username . clone ( ) ;
@@ -256,7 +256,7 @@ pub async fn db_post_from_url(url: Url) -> anyhow::Result<entities::post::Model>
256
256
Ok ( post)
257
257
} else {
258
258
let post = fetch_note_from_url ( url. clone ( ) ) . await ?;
259
- let res = receive_versia_note ( post, "https://ap.versia.social/example " . to_string ( ) ) . await ?; // TODO: Replace user id with actual user id
259
+ let res = receive_versia_note ( post, "https://" . to_string ( ) + & API_DOMAIN + "/example" ) . await ?; // TODO: Replace user id with actual user id
260
260
Ok ( res)
261
261
}
262
262
}
0 commit comments