REQ-3284: 推送声音
This commit is contained in:
parent
83720d336c
commit
f7166d2a87
@ -165,13 +165,11 @@ public class TemplateMessage {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(pushable && deviceCache.getDevice(receiver.getId()).shouldPush(appType, PushChannel.NIM)) {
|
||||
if (pushable && !deviceCache.getDevice(receiver.getId()).shouldPush(appType, PushChannel.NIM)) {
|
||||
ExcludePushPayload excludePush = new ExcludePushPayload();
|
||||
excludePush.setPersonId(receiver.getId() + "");
|
||||
excludePush.setAppType(appType);
|
||||
imReq.getExcludePushPayloads().add(excludePush);
|
||||
if (StringUtils.isNotBlank(pushData.getVoiceFile()))
|
||||
ext.put(Intent.INTENT_SOUND, pushData.getVoiceFile());
|
||||
}
|
||||
|
||||
receivers.add(new ReceivePerson(String.valueOf(receiver.getId()), ouId, appType));
|
||||
@ -189,8 +187,11 @@ public class TemplateMessage {
|
||||
ext.put("ouId", String.valueOf(sample.getReceiverOuId()));
|
||||
}
|
||||
imReq.setExt(ext);
|
||||
if (pushable)
|
||||
if (pushable) {
|
||||
imReq.setPayload(buildPayload(sample, appType));
|
||||
if (StringUtils.isNotBlank(pushData.getVoiceFile()))
|
||||
ext.put(Intent.INTENT_SOUND, pushData.getVoiceFile());
|
||||
}
|
||||
return imReq;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user