|
@ -1022,14 +1022,14 @@ class Sessions extends RedisModel {
|
|
|
res.forEach(function (participant) {
|
|
|
if (participant.id == message.sender_id){
|
|
|
message.sender_img = participant.avatar;
|
|
|
if(participant.participant_role == PARTICIPANT_ROLES.REGULAR){
|
|
|
if (message.content_type == CONTENT_TYPES.PlainText ||
|
|
|
message.content_type == CONTENT_TYPES.Image ||
|
|
|
message.content_type == CONTENT_TYPES.Audio||
|
|
|
message.content_type == CONTENT_TYPES.Video){
|
|
|
participants.updateUser(sessionId,message.sender_id,PARTICIPANT_ROLES.HOST);
|
|
|
}
|
|
|
}
|
|
|
// if(participant.participant_role == PARTICIPANT_ROLES.REGULAR){
|
|
|
// if (message.content_type == CONTENT_TYPES.PlainText ||
|
|
|
// message.content_type == CONTENT_TYPES.Image ||
|
|
|
// message.content_type == CONTENT_TYPES.Audio||
|
|
|
// message.content_type == CONTENT_TYPES.Video){
|
|
|
// participants.updateUser(sessionId,message.sender_id,PARTICIPANT_ROLES.HOST);
|
|
|
// }
|
|
|
// }
|
|
|
callPush(res,message);
|
|
|
}
|
|
|
})
|