@@ -43,7 +43,8 @@ use super::{
43
43
UpstreamSessionsCookie ,
44
44
} ;
45
45
use crate :: {
46
- impl_from_error_for_route, views:: shared:: OptionalPostAuthAction , PreferredLanguage , SiteConfig ,
46
+ impl_from_error_for_route, views:: shared:: OptionalPostAuthAction , BoundActivityTracker ,
47
+ PreferredLanguage , SiteConfig ,
47
48
} ;
48
49
49
50
const DEFAULT_LOCALPART_TEMPLATE : & str = "{{ user.preferred_username }}" ;
@@ -199,6 +200,7 @@ pub(crate) async fn get(
199
200
State ( url_builder) : State < UrlBuilder > ,
200
201
State ( homeserver) : State < BoxHomeserverConnection > ,
201
202
cookie_jar : CookieJar ,
203
+ activity_tracker : BoundActivityTracker ,
202
204
user_agent : Option < TypedHeader < headers:: UserAgent > > ,
203
205
Path ( link_id) : Path < Ulid > ,
204
206
) -> Result < impl IntoResponse , RouteError > {
@@ -445,6 +447,9 @@ pub(crate) async fn get(
445
447
registration_method : mas_policy:: RegistrationMethod :: UpstreamOAuth2 ,
446
448
username : & localpart,
447
449
email : None ,
450
+ requester : mas_policy:: Requester {
451
+ ip_address : activity_tracker. ip ( ) ,
452
+ } ,
448
453
} )
449
454
. await ?;
450
455
@@ -502,6 +507,7 @@ pub(crate) async fn post(
502
507
user_agent : Option < TypedHeader < headers:: UserAgent > > ,
503
508
mut policy : Policy ,
504
509
PreferredLanguage ( locale) : PreferredLanguage ,
510
+ activity_tracker : BoundActivityTracker ,
505
511
State ( templates) : State < Templates > ,
506
512
State ( homeserver) : State < BoxHomeserverConnection > ,
507
513
State ( url_builder) : State < UrlBuilder > ,
@@ -760,6 +766,9 @@ pub(crate) async fn post(
760
766
registration_method : mas_policy:: RegistrationMethod :: UpstreamOAuth2 ,
761
767
username : & username,
762
768
email : email. as_deref ( ) ,
769
+ requester : mas_policy:: Requester {
770
+ ip_address : activity_tracker. ip ( ) ,
771
+ } ,
763
772
} )
764
773
. await ?;
765
774
0 commit comments