|
@ -134,16 +134,7 @@ class Sessions extends RedisModel {
|
|
|
}
|
|
|
|
|
|
function callBusinessType(sessionId) {
|
|
|
if(type == SESSION_TYPES.MUC||
|
|
|
type == SESSION_TYPES.PRESCRIPTION ||
|
|
|
type == SESSION_TYPES.PRESCRIPTION_HOSPITAL ||
|
|
|
type==SESSION_TYPES.COLLABORATION_HOSPITAL ||
|
|
|
type==SESSION_TYPES.GUIDANCE_HOSPITAL ||
|
|
|
type==SESSION_TYPES.GENERAL_EXPERT ||
|
|
|
type==SESSION_TYPES.PRESCRIPTION_HOSPITAL_VIDEO ||
|
|
|
type==SESSION_TYPES.MUC_VIDEO ||
|
|
|
type==SESSION_TYPES.ONDOOR_NURSING||
|
|
|
type==SESSION_TYPES.GUIDANCE_ASSISTANT){
|
|
|
if(SESSION_TYPES.contantsTopticType(type)){
|
|
|
callCreate(sessionId, SESSION_BUSINESS_TYPE.PATIENT);
|
|
|
}else if(type==SESSION_TYPES.DISCUSSION||type==SESSION_TYPES.GROUP){
|
|
|
callCreate(sessionId, SESSION_BUSINESS_TYPE.DOCTOR);
|
|
@ -158,16 +149,7 @@ class Sessions extends RedisModel {
|
|
|
let createDate = new Date();
|
|
|
Participants.saveParticipantsToRedis(sessionId, participantArray, createDate, function (res) {
|
|
|
let sessionKey = RedisModel.makeRedisKey(REDIS_KEYS.Session, sessionId);
|
|
|
if (type == SESSION_TYPES.MUC||
|
|
|
type == SESSION_TYPES.PRESCRIPTION ||
|
|
|
type == SESSION_TYPES.PRESCRIPTION_HOSPITAL ||
|
|
|
type == SESSION_TYPES.COLLABORATION_HOSPITAL ||
|
|
|
type ==SESSION_TYPES.GUIDANCE_HOSPITAL ||
|
|
|
type==SESSION_TYPES.GENERAL_EXPERT ||
|
|
|
type==SESSION_TYPES.PRESCRIPTION_HOSPITAL_VIDEO ||
|
|
|
type==SESSION_TYPES.MUC_VIDEO ||
|
|
|
type==SESSION_TYPES.ONDOOR_NURSING||
|
|
|
type==SESSION_TYPES.GUIDANCE_ASSISTANT) {
|
|
|
if (SESSION_TYPES.contantsTopticType(type)) {
|
|
|
businessType = 2;
|
|
|
}
|
|
|
let session = {
|
|
@ -224,16 +206,7 @@ class Sessions extends RedisModel {
|
|
|
|
|
|
//流程2-判断session的业务类型;
|
|
|
function callBusinessType() {
|
|
|
if(type==SESSION_TYPES.MUC||
|
|
|
type==SESSION_TYPES.PRESCRIPTION ||
|
|
|
type==SESSION_TYPES.PRESCRIPTION_HOSPITAL ||
|
|
|
type==SESSION_TYPES.COLLABORATION_HOSPITAL ||
|
|
|
type==SESSION_TYPES.GUIDANCE_HOSPITAL ||
|
|
|
type==SESSION_TYPES.GENERAL_EXPERT ||
|
|
|
type==SESSION_TYPES.PRESCRIPTION_HOSPITAL_VIDEO ||
|
|
|
type==SESSION_TYPES.MUC_VIDEO ||
|
|
|
type==SESSION_TYPES.ONDOOR_NURSING||
|
|
|
type==SESSION_TYPES.GUIDANCE_ASSISTANT){
|
|
|
if(SESSION_TYPES.contantsTopticType(type)){
|
|
|
callCreateSession(SESSION_BUSINESS_TYPE.PATIENT);
|
|
|
}else if(type==SESSION_TYPES.SPECIALISTGROUP||type==SESSION_TYPES.DISCUSSION){
|
|
|
callCreateSession(SESSION_BUSINESS_TYPE.DOCTOR);
|
|
@ -439,7 +412,7 @@ class Sessions extends RedisModel {
|
|
|
* @param size
|
|
|
* @param businessType
|
|
|
*/
|
|
|
getUserSessions(userId, page, size, businessType) {
|
|
|
getUserSessions(userId,name,search_type, page, size, businessType) {
|
|
|
let userSessionKey = RedisModel.makeRedisKey(REDIS_KEYS.UserSessions, userId);
|
|
|
let self = this;
|
|
|
if (page > 0) {
|
|
@ -521,8 +494,11 @@ class Sessions extends RedisModel {
|
|
|
let lastLoginTime = new Date();
|
|
|
SessionRepo.findOne(sessionId, function (err, res) {
|
|
|
if(res){
|
|
|
session = res;
|
|
|
|
|
|
session = res[0];
|
|
|
session.create_date = new Date(session.create_date).getTime();
|
|
|
if(session.last_message_time){
|
|
|
session.last_message_time = new Date(session.last_message_time).getTime();
|
|
|
}
|
|
|
log.info("1.session.id:" + session.id);
|
|
|
log.info("1.session.name:" + session.name);
|
|
|
log.info("1.session.business_type:" + session.business_type);
|
|
@ -537,7 +513,7 @@ class Sessions extends RedisModel {
|
|
|
"last_content_type", session.last_content_type||"",
|
|
|
"last_content", session.last_content||"",
|
|
|
"last_message_time", session.last_message_time||"",
|
|
|
"create_date", new Date(session.create_date).getTime(),
|
|
|
"create_date", session.create_date,
|
|
|
"status",session.status==null?0:session.status
|
|
|
];
|
|
|
// cache sessions
|
|
@ -665,6 +641,25 @@ class Sessions extends RedisModel {
|
|
|
for(var j = 0 ;j<participantsTimeArray.length;j++){
|
|
|
if(j%2!=0)continue;
|
|
|
let participantsTimeJson = {};
|
|
|
//成员名字
|
|
|
let participantNames;
|
|
|
let sql = "SELECT u.name,u.avatar,1 as type FROM participants p, patients u " +
|
|
|
"WHERE p.session_id = ? AND p.participant_id = u.id AND P.participant_id=? union "+
|
|
|
" SELECT u.name,u.avatar,0 as type FROM participants p, doctors u " +
|
|
|
" WHERE p.session_id = ? AND p.participant_id = u.id AND P.participant_id=? ";
|
|
|
ImDb.execQuery({
|
|
|
"sql": sql,
|
|
|
"args": [sessionId,participantsTimeArray[j],sessionId,participantsTimeArray[j]],
|
|
|
"handler": function(err,participantNames){
|
|
|
if(participantNames&&participantNames.length>0){
|
|
|
participantsTimeJson["name"] = participantNames[0].name;
|
|
|
participantsTimeJson["avatar"] = participantNames[0].avatar;
|
|
|
participantsTimeJson["is_patient"] = participantNames[0].type;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
participantsTimeJson["id"] = participantsTimeArray[j];
|
|
|
participantsTimeJson[participantsTimeArray[j]] = participantsTimeArray[j+1];
|
|
|
participantsTime.push(participantsTimeJson);
|
|
|
}
|
|
@ -719,28 +714,101 @@ class Sessions extends RedisModel {
|
|
|
let topicId = topic.id;
|
|
|
});
|
|
|
});
|
|
|
|
|
|
sessionList.push({
|
|
|
id: sessionId,
|
|
|
name: sessionName,
|
|
|
create_date: parseInt(session.create_date),
|
|
|
last_content_type: session.last_content_type||"",
|
|
|
last_content: session.last_content||"",
|
|
|
sender_id: session.last_sender_id||"",
|
|
|
type: session.type,
|
|
|
sender_name: session.last_sender_name||"",
|
|
|
unread_count: count,
|
|
|
// business_type: session.business_type,
|
|
|
business_type: businessType,
|
|
|
my_role: role,
|
|
|
sender_sex: sex,
|
|
|
sender_birthday: bir,
|
|
|
participantsTimeArray:participantsTime,
|
|
|
status:session.status,
|
|
|
is_invite:isInvite,
|
|
|
backTopid:backTopid
|
|
|
});
|
|
|
|
|
|
var SearchExist=false;
|
|
|
if (search_type==1&&name){//医生
|
|
|
if (session.type!=2){
|
|
|
SearchExist = false;
|
|
|
}
|
|
|
else {
|
|
|
for (var tmpIndex in participantsTime){
|
|
|
var patientName = participantsTime[tmpIndex].name
|
|
|
var is_patient = participantsTime[tmpIndex].is_patient
|
|
|
if (is_patient=0&&(patientName+"").indexOf(name)!=-1){
|
|
|
SearchExist = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if((sessionName+"").indexOf(name)!=-1){SearchExist = true;}
|
|
|
}
|
|
|
if (search_type==2&&name){//患者
|
|
|
if (session.type!=2){
|
|
|
SearchExist = false;
|
|
|
}
|
|
|
else{
|
|
|
for (var tmpIndex in participantsTime){
|
|
|
var patientName = participantsTime[tmpIndex].name
|
|
|
var is_patient = participantsTime[tmpIndex].is_patient
|
|
|
if (is_patient=1&&(patientName+"").indexOf(name)!=-1){
|
|
|
SearchExist = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if((sessionName+"").indexOf(name)!=-1){SearchExist = true;}
|
|
|
}
|
|
|
if (search_type==3&&name){
|
|
|
if((sessionName+"").indexOf(name)!=-1){
|
|
|
sessionList.push({
|
|
|
id: sessionId,
|
|
|
name: sessionName,
|
|
|
create_date: new Date(session.last_message_time).getTime(),
|
|
|
last_content_type: session.last_content_type,
|
|
|
last_content: session.last_content,
|
|
|
sender_id: session.last_sender_id,
|
|
|
type: session.type,
|
|
|
sender_name: session.last_sender_name,
|
|
|
unread_count: count,
|
|
|
business_type: session.business_type,
|
|
|
my_role: role,
|
|
|
sender_sex: sex,
|
|
|
sender_birthday: bir,
|
|
|
participantsTimeArray:participantsTime,
|
|
|
status:session.status,
|
|
|
is_invite:isInvite
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
else if(name&&(search_type==1||search_type==2)){
|
|
|
if (SearchExist){
|
|
|
sessionList.push({
|
|
|
id: sessionId,
|
|
|
name: sessionName,
|
|
|
create_date: new Date(session.last_message_time).getTime(),
|
|
|
last_content_type: session.last_content_type,
|
|
|
last_content: session.last_content,
|
|
|
sender_id: session.last_sender_id,
|
|
|
type: session.type,
|
|
|
sender_name: session.last_sender_name,
|
|
|
unread_count: count,
|
|
|
business_type: session.business_type,
|
|
|
my_role: role,
|
|
|
sender_sex: sex,
|
|
|
sender_birthday: bir,
|
|
|
participantsTimeArray:participantsTime,
|
|
|
status:session.status,
|
|
|
is_invite:isInvite
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
else{
|
|
|
sessionList.push({
|
|
|
id: sessionId,
|
|
|
name: sessionName,
|
|
|
create_date: new Date(session.last_message_time).getTime(),
|
|
|
last_content_type: session.last_content_type,
|
|
|
last_content: session.last_content,
|
|
|
sender_id: session.last_sender_id,
|
|
|
type: session.type,
|
|
|
sender_name: session.last_sender_name,
|
|
|
unread_count: count,
|
|
|
business_type: session.business_type,
|
|
|
my_role: role,
|
|
|
sender_sex: sex,
|
|
|
sender_birthday: bir,
|
|
|
participantsTimeArray:participantsTime,
|
|
|
status:session.status,
|
|
|
is_invite:isInvite
|
|
|
});
|
|
|
}
|
|
|
index = (parseInt(index) + 1);
|
|
|
if (index == sessionIds.length) {
|
|
|
ModelUtil.emitOK(self.eventEmitter, sessionList);
|
|
@ -837,6 +905,24 @@ class Sessions extends RedisModel {
|
|
|
for(var j = 0 ;j<participantsTimeArray.length;j++){
|
|
|
if(j%2!=0)continue;
|
|
|
let participantsTimeJson = {};
|
|
|
//成员名字
|
|
|
let participantNames;
|
|
|
let sql = "SELECT u.name,u.avatar,1 as type FROM participants p, patients u " +
|
|
|
"WHERE p.session_id = ? AND p.participant_id = u.id AND P.participant_id=? union "+
|
|
|
" SELECT u.name,u.avatar,0 as type FROM participants p, doctors u " +
|
|
|
" WHERE p.session_id = ? AND p.participant_id = u.id AND P.participant_id=? ";
|
|
|
ImDb.execQuery({
|
|
|
"sql": sql,
|
|
|
"args": [sessionId,participantsTimeArray[j],sessionId,participantsTimeArray[j]],
|
|
|
"handler": function(err,participantNames){
|
|
|
if(participantNames&&participantNames.length>0){
|
|
|
participantsTimeJson["name"] = participantNames[0].name;
|
|
|
participantsTimeJson["avatar"] = participantNames[0].avatar;
|
|
|
participantsTimeJson["is_patient"] = participantNames[0].type;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
participantsTimeJson["id"] = participantsTimeArray[j];
|
|
|
participantsTimeJson[participantsTimeArray[j]] = participantsTimeArray[j+1];
|
|
|
participantsTime.push(participantsTimeJson);
|
|
|
}
|
|
@ -1037,7 +1123,7 @@ class Sessions extends RedisModel {
|
|
|
* @param size
|
|
|
* @param businessType
|
|
|
*/
|
|
|
getUserStatusSessions(userId,status,businessType,page, size) {
|
|
|
getUserStatusSessions(userId,status,businessType,name,search_type,page, size) {
|
|
|
let userSessionKey = RedisModel.makeRedisKey(REDIS_KEYS.UserSessions, userId);
|
|
|
log.info(userId);
|
|
|
let self = this;
|
|
@ -1097,6 +1183,23 @@ class Sessions extends RedisModel {
|
|
|
for(var j = 0 ;j<participantsTimeArray.length;j++){
|
|
|
if(j%2!=0)continue;
|
|
|
let participantsTimeJson = {};
|
|
|
let participantNames;
|
|
|
let sql = "SELECT u.name,u.avatar,1 as type FROM participants p, patients u " +
|
|
|
"WHERE p.session_id = ? AND p.participant_id = u.id AND P.participant_id=? union "+
|
|
|
" SELECT u.name,u.avatar,0 as type FROM participants p, doctors u " +
|
|
|
" WHERE p.session_id = ? AND p.participant_id = u.id AND P.participant_id=? ";
|
|
|
ImDb.execQuery({
|
|
|
"sql": sql,
|
|
|
"args": [sessionId,participantsTimeArray[j],sessionId,participantsTimeArray[j]],
|
|
|
"handler": function(err,participantNames){
|
|
|
if(participantNames&&participantNames.length>0){
|
|
|
participantsTimeJson["name"] = participantNames[0].name;
|
|
|
participantsTimeJson["avatar"] = participantNames[0].avatar;
|
|
|
participantsTimeJson["is_patient"] = participantNames[0].type;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
participantsTimeJson["id"] = participantsTimeArray[j];
|
|
|
participantsTimeJson[participantsTimeArray[j]] = participantsTimeArray[j+1];
|
|
|
participantsTime.push(participantsTimeJson);
|
|
|
}
|
|
@ -1132,26 +1235,102 @@ class Sessions extends RedisModel {
|
|
|
if (res.length != 0 && res[0].sex) {
|
|
|
sex = res[0].sex;
|
|
|
}
|
|
|
var SearchExist=false;
|
|
|
if (search_type==1&&name){//医生
|
|
|
if (session.type!=2){
|
|
|
SearchExist = false;
|
|
|
}
|
|
|
else{
|
|
|
for (var tmpIndex in participantsTime){
|
|
|
var patientName = participantsTime[tmpIndex].name
|
|
|
var is_patient = participantsTime[tmpIndex].is_patient
|
|
|
if (is_patient=0&&(patientName+"").indexOf(name)!=-1){
|
|
|
SearchExist = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if((sessionName+"").indexOf(name)!=-1){SearchExist = true;}
|
|
|
}
|
|
|
if (search_type==2&&name){//患者
|
|
|
if (session.type!=2){
|
|
|
SearchExist = false;
|
|
|
}
|
|
|
else{
|
|
|
for (var tmpIndex in participantsTime){
|
|
|
var patientName = participantsTime[tmpIndex].name
|
|
|
var is_patient = participantsTime[tmpIndex].is_patient
|
|
|
if (is_patient=1&&(patientName+"").indexOf(name)!=-1){
|
|
|
SearchExist = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if((sessionName+"").indexOf(name)!=-1){SearchExist = true;}
|
|
|
|
|
|
sessionList.push({
|
|
|
id: sessionId,
|
|
|
name: sessionName,
|
|
|
create_date: new Date(mysqlSession.last_message_time).getTime(),
|
|
|
last_content_type: session.last_content_type,
|
|
|
last_content: session.last_content,
|
|
|
sender_id: session.last_sender_id,
|
|
|
type: session.type,
|
|
|
sender_name: session.last_sender_name,
|
|
|
unread_count: count,
|
|
|
business_type: session.business_type,
|
|
|
my_role: role,
|
|
|
sender_sex: sex,
|
|
|
sender_birthday: bir,
|
|
|
participantsTimeArray:participantsTime,
|
|
|
status:session.status,
|
|
|
is_invite:isInvite
|
|
|
});
|
|
|
|
|
|
}
|
|
|
if (search_type==3&&name){
|
|
|
if((sessionName+"").indexOf(name)!=-1){
|
|
|
sessionList.push({
|
|
|
id: sessionId,
|
|
|
name: sessionName,
|
|
|
create_date: new Date(mysqlSession.last_message_time).getTime(),
|
|
|
last_content_type: session.last_content_type,
|
|
|
last_content: session.last_content,
|
|
|
sender_id: session.last_sender_id,
|
|
|
type: session.type,
|
|
|
sender_name: session.last_sender_name,
|
|
|
unread_count: count,
|
|
|
business_type: session.business_type,
|
|
|
my_role: role,
|
|
|
sender_sex: sex,
|
|
|
sender_birthday: bir,
|
|
|
participantsTimeArray:participantsTime,
|
|
|
status:session.status,
|
|
|
is_invite:isInvite
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
else if(name&&(search_type==1||search_type==2)){
|
|
|
if (SearchExist){
|
|
|
sessionList.push({
|
|
|
id: sessionId,
|
|
|
name: sessionName,
|
|
|
create_date: new Date(mysqlSession.last_message_time).getTime(),
|
|
|
last_content_type: session.last_content_type,
|
|
|
last_content: session.last_content,
|
|
|
sender_id: session.last_sender_id,
|
|
|
type: session.type,
|
|
|
sender_name: session.last_sender_name,
|
|
|
unread_count: count,
|
|
|
business_type: session.business_type,
|
|
|
my_role: role,
|
|
|
sender_sex: sex,
|
|
|
sender_birthday: bir,
|
|
|
participantsTimeArray:participantsTime,
|
|
|
status:session.status,
|
|
|
is_invite:isInvite
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
else{
|
|
|
sessionList.push({
|
|
|
id: sessionId,
|
|
|
name: sessionName,
|
|
|
create_date: new Date(mysqlSession.last_message_time).getTime(),
|
|
|
last_content_type: session.last_content_type,
|
|
|
last_content: session.last_content,
|
|
|
sender_id: session.last_sender_id,
|
|
|
type: session.type,
|
|
|
sender_name: session.last_sender_name,
|
|
|
unread_count: count,
|
|
|
business_type: session.business_type,
|
|
|
my_role: role,
|
|
|
sender_sex: sex,
|
|
|
sender_birthday: bir,
|
|
|
participantsTimeArray:participantsTime,
|
|
|
status:session.status,
|
|
|
is_invite:isInvite
|
|
|
});
|
|
|
}
|
|
|
index = (parseInt(index) + 1);
|
|
|
if (index == sessionIds.length) {
|
|
|
ModelUtil.emitOK(self.eventEmitter, sessionList);
|
|
@ -1404,16 +1583,7 @@ class Sessions extends RedisModel {
|
|
|
if(users[j]==userId)continue;
|
|
|
WechatClient.sendAllRead(users[j],sessionId);
|
|
|
}
|
|
|
}else if(session.type == SESSION_TYPES.MUC ||
|
|
|
session.type == SESSION_TYPES.PRESCRIPTION ||
|
|
|
session.type==SESSION_TYPES.PRESCRIPTION_HOSPITAL ||
|
|
|
session.type==SESSION_TYPES.COLLABORATION_HOSPITAL ||
|
|
|
session.type==SESSION_TYPES.GUIDANCE_HOSPITAL ||
|
|
|
session.type==SESSION_TYPES.GENERAL_EXPERT ||
|
|
|
session.type==SESSION_TYPES.PRESCRIPTION_HOSPITAL_VIDEO ||
|
|
|
session.type==SESSION_TYPES.MUC_VIDEO ||
|
|
|
session.type==SESSION_TYPES.ONDOOR_NURSING||
|
|
|
session.type==SESSION_TYPES.GUIDANCE_ASSISTANT){
|
|
|
}else if(SESSION_TYPES.contantsTopticType(session.type)){
|
|
|
for(var j in users){
|
|
|
if(users[j]==userId)continue;
|
|
|
WechatClient.sendMucAllRead(users[j],userId,sessionId);
|
|
@ -1446,16 +1616,7 @@ class Sessions extends RedisModel {
|
|
|
//通知对方自己已经读取数据
|
|
|
WechatClient.sendAllRead(users[j],sessionId);
|
|
|
}
|
|
|
}else if(session.type == SESSION_TYPES.MUC ||
|
|
|
session.type == SESSION_TYPES.PRESCRIPTION ||
|
|
|
session.type==SESSION_TYPES.PRESCRIPTION_HOSPITAL ||
|
|
|
session.type==SESSION_TYPES.COLLABORATION_HOSPITAL ||
|
|
|
session.type==SESSION_TYPES.GUIDANCE_HOSPITAL ||
|
|
|
session.type==SESSION_TYPES.GENERAL_EXPERT ||
|
|
|
session.type==SESSION_TYPES.PRESCRIPTION_HOSPITAL_VIDEO ||
|
|
|
session.type==SESSION_TYPES.MUC_VIDEO ||
|
|
|
session.type==SESSION_TYPES.ONDOOR_NURSING||
|
|
|
session.type==SESSION_TYPES.GUIDANCE_ASSISTANT){
|
|
|
}else if(SESSION_TYPES.contantsTopticType(session.type)){
|
|
|
for(var j in users){
|
|
|
if(users[j]==userId)continue;
|
|
|
//如果是患者拉取数据告诉在线的医生患者已经读取数据
|
|
@ -1774,16 +1935,7 @@ class Sessions extends RedisModel {
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
if(sessionType == SESSION_TYPES.MUC ||
|
|
|
sessionType == SESSION_TYPES.PRESCRIPTION ||
|
|
|
sessionType ==SESSION_TYPES.PRESCRIPTION_HOSPITAL ||
|
|
|
sessionType ==SESSION_TYPES.COLLABORATION_HOSPITAL ||
|
|
|
sessionType ==SESSION_TYPES.GUIDANCE_HOSPITAL ||
|
|
|
sessionType ==SESSION_TYPES.GENERAL_EXPERT ||
|
|
|
sessionType ==SESSION_TYPES.PRESCRIPTION_HOSPITAL_VIDEO ||
|
|
|
sessionType ==SESSION_TYPES.MUC_VIDEO ||
|
|
|
sessionType ==SESSION_TYPES.ONDOOR_NURSING||
|
|
|
sessionType ==SESSION_TYPES.GUIDANCE_ASSISTANT){
|
|
|
if(SESSION_TYPES.contantsTopticType(sessionType)){
|
|
|
if(message.content_type == CONTENT_TYPES.PlainText ||
|
|
|
message.content_type == CONTENT_TYPES.Image ||
|
|
|
message.content_type == CONTENT_TYPES.Audio||
|