diff --git a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/leaderboard/SlackMessageService.java b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/leaderboard/SlackMessageService.java index 448157e5..025b3cfa 100644 --- a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/leaderboard/SlackMessageService.java +++ b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/leaderboard/SlackMessageService.java @@ -44,6 +44,9 @@ public class SlackMessageService { @Value("${slack.runScheduledMessage}") private boolean runScheduledMessage; + @Value("${spring.url:localhost:8080}") + private String hephaestusUrl; + @Autowired private App slackApp; @@ -105,7 +108,9 @@ public void sendScheduledLeaderboard() { context(context -> context .elements(List.of(markdownText("*" + currentDate + "*")))), section(section -> section.text(markdownText( - "Another *review leaderboard* has concluded. You can check out your placement at ."))), + "Another *review leaderboard* has concluded. You can check out your placement at " + + hephaestusUrl + + "."))), section(section -> section.text(markdownText( "Special thanks to our top 3 reviewers of last week:"))), section(section -> section.text(markdownText( @@ -131,6 +136,7 @@ public void run() { logger.info("Slack scheduled messages are disabled, skipping Slack app init test."); return; } + logger.info("Testing Slack app initialization..."); AuthTestResponse response; try { response = slackApp.client().authTest(r -> r); diff --git a/server/application-server/src/main/resources/application-prod.yml b/server/application-server/src/main/resources/application-prod.yml index 2fe43307..0f029feb 100644 --- a/server/application-server/src/main/resources/application-prod.yml +++ b/server/application-server/src/main/resources/application-prod.yml @@ -7,6 +7,7 @@ spring: hibernate: # TODO: Change to none and use liquibase ddl-auto: update + url: ${APPLICATION_SERVER_URL} security: oauth2: