Przeglądaj źródła

消息发送整改

8 lat temu
rodzic
commit
166a7d0a76

+ 1 - 0
src/server/models/sessions/participants.js

@ -255,6 +255,7 @@ class Participants extends RedisModel {
                                return;
                            }else{
                                ModelUtil.emitOK(self.eventEmitter, {status:200,message: "成员变更成功!"});
                                return;
                            }
                        })
                    });

+ 7 - 3
src/server/models/sessions/sessions.js

@ -113,9 +113,13 @@ class Sessions extends RedisModel {
        }
        function callBusinessType(sessionId) {
            ParticipantRepo.getBusinessType(participantIdArray.join("','"), function (err, businessType) {
                callCreate(sessionId, businessType);
            });
            if(participantIdArray.length==0&&type == SESSION_TYPES.MUC){
                callCreate(sessionId, 2);
            }else{
                ParticipantRepo.getBusinessType(participantIdArray.join("','"), function (err, businessType) {
                    callCreate(sessionId, businessType);
                });
            }
        }
        function callCreate(sessionId, businessType) {

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

@ -228,7 +228,7 @@ class Topics extends RedisModel {
            msg.sender_name = messages.sender_name;
            msg.content_type = 6;
            msg.content = messages.description;
            msg.timestamp = new Date();
            msg.timestamp = new Date(new Date().getTime()+1000);
            sessions.saveMessageByTopic(msg, sessionId, function (err, msgId) {
                if (messages.img) {
                    sendQuesionImg(startMsgId);
@ -238,7 +238,6 @@ class Topics extends RedisModel {
                }
            });
        }
        //step4:发送求助内容的图片
        function sendQuesionImg(startMsgId) {
            let imgs = messages.img.split(",");

+ 1 - 1
src/server/util/db.util.js

@ -38,7 +38,7 @@ class DbUtil {
                        return;
                    }
                    if(!handler)log.info("错误sql:"+options.sql);
                    // 处理结果
                    handler(err, results);
                });