From bf5f2142d73a5745124d03f6b6f06c59873e47de Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 27 Dec 2017 16:23:28 +0300 Subject: Messenger bot --- juick-crosspost/src/main/java/com/juick/service/Crosspost.java | 3 ++- .../src/main/java/com/juick/service/rest/CrosspostRestService.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'juick-crosspost') diff --git a/juick-crosspost/src/main/java/com/juick/service/Crosspost.java b/juick-crosspost/src/main/java/com/juick/service/Crosspost.java index 55c4407c..7fcb9a52 100644 --- a/juick-crosspost/src/main/java/com/juick/service/Crosspost.java +++ b/juick-crosspost/src/main/java/com/juick/service/Crosspost.java @@ -68,7 +68,8 @@ public class Crosspost implements ApplicationListener { } public boolean facebookPost(final com.juick.Message jmsg) { - String token = crosspostService.getFacebookToken(jmsg.getUser().getUid()).orElse(StringUtils.EMPTY); + String token = crosspostService.getFacebookTokens(jmsg.getUser().getUid()) + .orElse(Pair.of(StringUtils.EMPTY, StringUtils.EMPTY)).getRight(); if (token.isEmpty()) { return false; } diff --git a/juick-crosspost/src/main/java/com/juick/service/rest/CrosspostRestService.java b/juick-crosspost/src/main/java/com/juick/service/rest/CrosspostRestService.java index 52b72c3f..dbc0bdc9 100644 --- a/juick-crosspost/src/main/java/com/juick/service/rest/CrosspostRestService.java +++ b/juick-crosspost/src/main/java/com/juick/service/rest/CrosspostRestService.java @@ -33,8 +33,8 @@ public class CrosspostRestService implements CrosspostService { } @Override - public Optional getFacebookToken(int uid) { - return null; + public Optional> getFacebookTokens(int uid) { + return Optional.empty(); } @Override -- cgit v1.2.3