@@ -57,7 +57,8 @@ public function __construct()
57
57
$ config ->http_client = Client::class;
58
58
$ config ->http_stream_factory = HttpFactory::class;
59
59
$ config ->http_request_factory = HttpFactory::class;
60
- $ config ->http_user_agent = sprintf ('SeAT %s/%s ' , $ version , setting ('admin_contact ' , true ));
60
+ $ config ->http_user_agent = sprintf ('SeAT %s ' , $ version );
61
+ $ config ->http_user_agent_eveapi_version = $ version ; //store this for later.
61
62
62
63
$ config ->logger = Log::channel ('eseye ' );
63
64
$ config ->cache = Cache::store ('eseye ' );
@@ -190,6 +191,16 @@ public function setBody(array $body): EsiClient
190
191
*/
191
192
public function invoke (string $ method , string $ uri , array $ uri_data = []): EsiResponse
192
193
{
194
+ // Here we update the user--agent with contact information.
195
+ // At this point it is updating it each call, at the cost
196
+ // of a cache request each time. If this proves to impact,
197
+ // then in the future we could guard the cache call.
198
+ // The benefit to not guarding it is that changes made in
199
+ // the UI are appied immediately.
200
+ $ config = Configuration::getInstance ();
201
+ $ version = $ config ->http_user_agent_eveapi_version ;
202
+ $ config ->http_user_agent = sprintf ('SeAT %s/%s ' , $ version , setting ('admin_contact ' , true ));
203
+
193
204
$ response = $ this ->instance ->invoke ($ method , $ uri , $ uri_data );
194
205
195
206
return new \Seat \Eveapi \Containers \EsiResponse (
0 commit comments