REQ-3284: 推送声音

This commit is contained in:
yanglin 2024-12-02 20:08:03 +08:00
parent 870423e844
commit 591e507c5c
2 changed files with 2 additions and 6 deletions

View File

@ -14,6 +14,7 @@ import cn.axzo.msg.center.service.domain.UrlConfigWalker;
import cn.axzo.msg.center.service.domain.url.AppUrl;
import cn.axzo.msg.center.service.enums.CodeDefinition;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.stereotype.Service;
@ -67,7 +68,7 @@ public class NimPushService {
intent.setValue(Intent.INTENT_OU_ID, IntentValue.create(peer.getOuId()));
if (peer.getWorkspaceId() != null && peer.getWorkspaceId() != 0L)
intent.setValue(Intent.INTENT_WORKSPACE_ID, IntentValue.create(peer.getWorkspaceId()));
if (content.hasCustomSoundFile())
if (StringUtils.isNotBlank(content.getCustomSoundFile()))
intent.setValue(Intent.INTENT_SOUND, IntentValue.create(content.getCustomSoundFile()));
};
JSONObject payload = new JSONObject();

View File

@ -5,7 +5,6 @@ import cn.axzo.msg.center.inside.notices.config.push.PushProps.ChannelConfig;
import cn.axzo.msg.center.inside.notices.config.push.PushProps.ChannelIds;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.StringUtils;
/**
* @author yanglin
@ -49,10 +48,6 @@ public class PushContent {
*/
private String customSoundFile;
public boolean hasCustomSoundFile() {
return StringUtils.isNotBlank(customSoundFile);
}
public String determineAndroidCategory() {
return messageTye == PushMessageTye.OP
? "MARKETING"