mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-30 14:36:19 +02:00
Newest messages first when listing msgs from Gopher
This commit is contained in:
parent
3af5b6f509
commit
ebc70907d4
2 changed files with 22 additions and 9 deletions
|
@ -353,13 +353,19 @@ function getNewMessagesInAreaForUser(userId, areaTag, cb) {
|
|||
});
|
||||
}
|
||||
|
||||
function getMessageListForArea(client, areaTag, cb) {
|
||||
const filter = {
|
||||
areaTag,
|
||||
resultType : 'messageList',
|
||||
sort : 'messageId',
|
||||
order : 'ascending',
|
||||
};
|
||||
function getMessageListForArea(client, areaTag, filter, cb)
|
||||
{
|
||||
if(!cb && _.isFunction(filter)) {
|
||||
cb = filter;
|
||||
filter = {
|
||||
areaTag,
|
||||
resultType : 'messageList',
|
||||
sort : 'messageId',
|
||||
order : 'ascending'
|
||||
};
|
||||
} else {
|
||||
Object.assign(filter, { areaTag } );
|
||||
}
|
||||
|
||||
if(Message.isPrivateAreaTag(areaTag)) {
|
||||
filter.privateTagUserId = client.user.userId;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue