File tree 1 file changed +16
-1
lines changed
Classes/Domain/Repository
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public function __construct(readonly protected RequestFactory $requestFactory)
24
24
public function findBySettings (array $ settings ): array
25
25
{
26
26
$ parameters = [
27
- 'actor ' => $ settings[ ' account ' ] ?? ' in2code.de ' ,
27
+ 'actor ' => $ this -> getActor ( $ settings) ,
28
28
'limit ' => (int )($ settings ['limit ' ] ?? 10 ) ?: 10 ,
29
29
'filter ' => 'posts_and_author_threads ' ,
30
30
];
@@ -42,4 +42,19 @@ public function findBySettings(array $settings): array
42
42
}
43
43
return $ result ['feed ' ];
44
44
}
45
+
46
+ /**
47
+ * https://bsky.app/profile/www.helmholtz-munich.de
48
+ *
49
+ * @param array $settings
50
+ * @return string
51
+ */
52
+ private function getActor (array $ settings ): string
53
+ {
54
+ $ account = $ settings ['account ' ] ?? 'in2code.de ' ;
55
+ if (stristr ($ account , '/ ' )) {
56
+ $ account = basename ($ account );
57
+ }
58
+ return $ account ;
59
+ }
45
60
}
You can’t perform that action at this time.
0 commit comments