remove search from private-messages (#12044)

* remove search from private-messages + paged conversations + fixes

* remove autoSize call

* add conversation border at the top

* border-bottom under `Disable Private Messages` - revert border-bottom on conversation items
This commit is contained in:
negue
2020-04-20 16:32:54 +02:00
committed by GitHub
parent 0e36c1aa0f
commit cbcc7cd479
6 changed files with 135 additions and 160 deletions

View File

@@ -81,6 +81,9 @@ api.clearMessages = {
* This is for API v4 which must not be used in third-party tools.
* For API v3, use "Get inbox messages for a user".
*
* @apiParam (Query) {Number} page (optional) Load the conversations of the selected Page
* - 10 conversations per Page
*
* @apiSuccess {Array} data An array of inbox conversations
*
* @apiSuccessExample {json} Success-Response:
@@ -104,8 +107,9 @@ api.conversations = {
url: '/inbox/conversations',
async handler (req, res) {
const { user } = res.locals;
const { page } = req.query;
const result = await listConversations(user);
const result = await listConversations(user, page);
res.respond(200, result);
},
@@ -129,8 +133,7 @@ api.getInboxMessages = {
middlewares: [authWithHeaders()],
async handler (req, res) {
const { user } = res.locals;
const { page } = req.query;
const { conversation } = req.query;
const { page, conversation } = req.query;
const userInbox = await getUserInbox(user, {
page, conversation, mapProps: true,