Sfoglia il codice sorgente

fix(slack-client): new working hours

Joe 11 mesi fa
parent
commit
fd5c5afb84
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      .scripts/slack_client.py

+ 2 - 2
.scripts/slack_client.py

@@ -163,7 +163,7 @@ class TimeParser:
         hour = int(self._date.strftime("%H"))
         if not is_weekday or (weekday == 5 and hour >= 16):
             return WorkTime.WEEKEND
-        if hour < 8 or hour >= 18:
+        if hour < 7 or hour >= 20:
             return WorkTime.OFF_HOURS
         elif hour <= 12:
             return WorkTime.WORK_MORNING
@@ -551,7 +551,7 @@ class SlackClient(Cacheable):
         if cache and (cached := self._read_cache(cache_key)) and type(cached) == dict:
             return cached
         req = request.Request(
-            f'{self._app_config["url"]}/api/{method}',
+            f"{self._app_config['url']}/api/{method}",
             headers={
                 "Authorization": "Bearer " + self._token,
                 "Cookie": ";".join([f"{k}={v}" for k, v in self._cookies]),