Another message area check
This commit is contained in:
parent
24e18b5a7e
commit
8027a73ea5
|
@ -404,8 +404,15 @@ function getMessageListForArea(client, areaTag, filter, cb)
|
|||
Object.assign(filter, { areaTag } );
|
||||
}
|
||||
|
||||
if(client) {
|
||||
const area = getMessageAreaByTag(areaTag);
|
||||
if(!client.acs.hasMessageAreaRead(area)) {
|
||||
return cb(null, []);
|
||||
}
|
||||
}
|
||||
|
||||
if(Message.isPrivateAreaTag(areaTag)) {
|
||||
filter.privateTagUserId = client.user.userId;
|
||||
filter.privateTagUserId = client ? client.user.userId : 'INVALID_USER_ID';
|
||||
}
|
||||
|
||||
return Message.findMessages(filter, cb);
|
||||
|
|
|
@ -130,9 +130,11 @@ function userLogin(client, username, password, options, cb) {
|
|||
function postLoginPrep(client, cb) {
|
||||
|
||||
const defaultMsgAreaTag = (confTag) => {
|
||||
return getDefaultMessageAreaTagByConfTag(client, confTag) ||
|
||||
return (
|
||||
getDefaultMessageAreaTagByConfTag(client, confTag) ||
|
||||
getDefaultMessageAreaTagByConfTag(client, getDefaultMessageConferenceTag(client)) ||
|
||||
'';
|
||||
''
|
||||
);
|
||||
};
|
||||
|
||||
async.series(
|
||||
|
|
Loading…
Reference in New Issue