Skip to content

Commit c4a4366

Browse files
author
夜色
committed
add index page
1 parent f5b0c43 commit c4a4366

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/shinemo/mpush/alloc/PushHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public void handle(HttpExchange httpExchange) throws IOException {
7474
private void sendPush(Map<String, Object> params) {
7575
String userId = (String) params.get("userId");
7676
String hello = (String) params.get("hello");
77-
boolean broadcast = (Boolean) params.get("broadcast");
77+
Boolean broadcast = (Boolean) params.get("broadcast");
7878
String condition = (String) params.get("condition");
7979

8080

@@ -89,7 +89,7 @@ private void sendPush(Map<String, Object> params) {
8989
pushSender.send(PushContext
9090
.build(pushMsg)
9191
.setUserId(Strings.isBlank(userId) ? null : userId)
92-
.setBroadcast(broadcast)
92+
.setBroadcast(broadcast != null && broadcast)
9393
.setCondition(Strings.isBlank(condition) ? null : condition)
9494
.setCallback(new PushCallback() {
9595
@Override

0 commit comments

Comments
 (0)