aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-02-17 19:33:16 +0300
committerGravatar Vitaly Takmazov2018-02-17 19:33:16 +0300
commit9f30de2d192655f4e8fa11f35fafc4035bc4ebaf (patch)
tree2e9634552157a3146bc4e37ebe794f34a937585a
parent9c676d6b1910c2f01f13e9df418496cc89ce35be (diff)
update maven dependencies
-rw-r--r--juick-server/build.gradle4
-rw-r--r--juick-server/src/main/java/com/juick/server/MessengerManager.java7
-rw-r--r--juick-www/build.gradle2
3 files changed, 7 insertions, 6 deletions
diff --git a/juick-server/build.gradle b/juick-server/build.gradle
index aa267876..d88e0b77 100644
--- a/juick-server/build.gradle
+++ b/juick-server/build.gradle
@@ -16,7 +16,7 @@ dependencies {
compile 'io.springfox:springfox-swagger-ui:2.8.0'
compile 'com.github.pengrad:java-telegram-bot-api:3.5.2'
- compile 'com.github.messenger4j:messenger4j:1.0.0-M2'
+ compile 'com.github.messenger4j:messenger4j:1.0.0-M3'
compile 'org.springframework.social:spring-social-twitter:1.1.2.RELEASE'
compile 'com.vk.api:sdk:0.5.11'
compile 'org.apache.commons:commons-email:1.5'
@@ -26,7 +26,7 @@ dependencies {
testCompile project(path: ':juick-server-web', configuration: 'testArtifacts')
testCompile project(path: ':juick-server-jdbc', configuration: 'testArtifacts')
- testRuntime 'org.apache.tomcat.embed:tomcat-embed-websocket:9.0.4'
+ testRuntime 'org.apache.tomcat.embed:tomcat-embed-websocket:9.0.5'
testRuntime 'com.jayway.jsonpath:json-path:2.4.0'
}
diff --git a/juick-server/src/main/java/com/juick/server/MessengerManager.java b/juick-server/src/main/java/com/juick/server/MessengerManager.java
index 2979fa28..14a43d6a 100644
--- a/juick-server/src/main/java/com/juick/server/MessengerManager.java
+++ b/juick-server/src/main/java/com/juick/server/MessengerManager.java
@@ -5,6 +5,7 @@ import com.github.messenger4j.exception.MessengerApiException;
import com.github.messenger4j.exception.MessengerIOException;
import com.github.messenger4j.exception.MessengerVerificationException;
import com.github.messenger4j.send.MessagePayload;
+import com.github.messenger4j.send.MessagingType;
import com.github.messenger4j.send.message.TemplateMessage;
import com.github.messenger4j.send.message.TextMessage;
import com.github.messenger4j.send.message.template.ButtonTemplate;
@@ -125,9 +126,9 @@ public class MessengerManager implements ApplicationListener<MessageEvent> {
if (!StringUtils.isEmpty(url)) {
final UrlButton showMessage = UrlButton.create("VIEW MESSAGE", new URL(url));
ButtonTemplate template = ButtonTemplate.create(text, Collections.singletonList(showMessage));
- messenger.send(MessagePayload.create(messengerUser, TemplateMessage.create(template)));
+ messenger.send(MessagePayload.create(messengerUser, MessagingType.NON_PROMOTIONAL_SUBSCRIPTION, TemplateMessage.create(template)));
} else {
- messenger.send(MessagePayload.create(messengerUser, TextMessage.create(text)));
+ messenger.send(MessagePayload.create(messengerUser, MessagingType.NON_PROMOTIONAL_SUBSCRIPTION, TextMessage.create(text)));
}
} catch (MessengerApiException | MessengerIOException | MalformedURLException e) {
logger.warn("messenger error", e);
@@ -138,6 +139,6 @@ public class MessengerManager implements ApplicationListener<MessageEvent> {
new URL("https://juick.com/signup?type=messenger&hash=" + hash));
ButtonTemplate template = ButtonTemplate.create("Login to receive notifications",
Collections.singletonList(urlButton));
- messenger.send(MessagePayload.create(messengerUser, TemplateMessage.create(template)));
+ messenger.send(MessagePayload.create(messengerUser, MessagingType.RESPONSE, TemplateMessage.create(template)));
}
}
diff --git a/juick-www/build.gradle b/juick-www/build.gradle
index 1db0ceaa..54076360 100644
--- a/juick-www/build.gradle
+++ b/juick-www/build.gradle
@@ -27,7 +27,7 @@ dependencies {
compile project(':juick-server-jdbc')
compile 'com.github.scribejava:scribejava-apis:5.2.0-java7again'
compile 'com.github.ooxi:serialized-php-parser:0.5.0'
- compile 'com.sun.mail:javax.mail:1.6.0'
+ compile 'com.sun.mail:javax.mail:1.6.1'
compile 'com.mitchellbosecke:pebble-spring4:2.4.0'
compile 'com.atlassian.commonmark:commonmark:0.11.0'
compile 'com.atlassian.commonmark:commonmark-ext-autolink:0.11.0'