Browse Source

配置修改

yeshijie 7 years ago
parent
commit
0810611a79

+ 2 - 0
src/server/include/commons.js

@ -87,6 +87,8 @@ const CONTENT_TYPES = {
    Video:12,//视频
    System:13,//系统消息
    PrescriptionCheck:15,//续方审核消息消息
    PrescriptionBloodStatus:16,//续方咨询血糖血压咨询消息
    PrescriptionFollowupContent:17,//续方咨询随访问卷消息
    typeToDescription: function (type, defaultDescription) {
        if (CONTENT_TYPES.Image == type) {
            return '[图片]';

+ 4 - 1
src/server/models/client/wechat.client.js

@ -60,7 +60,10 @@ class WechatClient extends RedisModel {
    static sendMessage(targetUserId, targetUserName, message) {
        if (message&&(message.content_type == CONTENT_TYPES.PlainText ||
            message.content_type == CONTENT_TYPES.Image ||
            message.content_type == CONTENT_TYPES.Audio)) {
            message.content_type == CONTENT_TYPES.Audio||
            message.content_type == CONTENT_TYPES.PrescriptionCheck ||
            message.content_type == CONTENT_TYPES.PrescriptionBloodStatus ||
            message.content_type == CONTENT_TYPES.PrescriptionFollowupContent)) {
            let patientClient = clientCache.findById(targetUserId);
            let doctorClient = clientCache.findByIdAndType(message.sender_id,SOCKET_TYPES.DOCTOR);
            if (patientClient) {

+ 2 - 1
src/server/models/sessions/sessions.js

@ -1266,7 +1266,8 @@ class Sessions extends RedisModel {
        });
        function callPush(participants,message){
            participants.forEach(function (participant) {
                if (participant.id !== message.sender_id &&
                if ((participant.id !== message.sender_id||message.content_type == CONTENT_TYPES.PrescriptionBloodStatus ||
                    message.content_type == CONTENT_TYPES.PrescriptionFollowupContent) &&
                    participant.participant_role == PARTICIPANT_ROLES.HOST) {
                    Sessions.pushNotification(participant.id, participant.name, message,sessionType);
                }