mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-05 20:11:26 +01:00
closes #5084
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
"nodebb-plugin-spam-be-gone": "0.4.10",
|
||||
"nodebb-rewards-essentials": "0.0.9",
|
||||
"nodebb-theme-lavender": "3.0.15",
|
||||
"nodebb-theme-persona": "4.1.84",
|
||||
"nodebb-theme-persona": "4.1.85",
|
||||
"nodebb-theme-vanilla": "5.1.55",
|
||||
"nodebb-widget-essentials": "2.0.13",
|
||||
"nodemailer": "2.6.4",
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
"signature": "Signature",
|
||||
"birthday": "Birthday",
|
||||
"chat": "Chat",
|
||||
"chat_with": "Chat with %1",
|
||||
"chat_with": "Continue chat with %1",
|
||||
"new_chat_with": "Start new chat with %1",
|
||||
"follow": "Follow",
|
||||
"unfollow": "Unfollow",
|
||||
"more": "More",
|
||||
|
||||
@@ -41,6 +41,11 @@ define('forum/account/header', [
|
||||
});
|
||||
});
|
||||
|
||||
components.get('account/new-chat').on('click', function () {
|
||||
app.newChat(ajaxify.data.uid);
|
||||
});
|
||||
|
||||
|
||||
components.get('account/ban').on('click', banAccount);
|
||||
components.get('account/unban').on('click', unbanAccount);
|
||||
components.get('account/delete').on('click', deleteAccount);
|
||||
|
||||
@@ -11,6 +11,7 @@ var meta = require('../../meta');
|
||||
var accountHelpers = require('./helpers');
|
||||
var helpers = require('../helpers');
|
||||
var pagination = require('../../pagination');
|
||||
var messaging = require('../../messaging');
|
||||
|
||||
var profileController = {};
|
||||
|
||||
@@ -46,8 +47,8 @@ profileController.get = function (req, res, callback) {
|
||||
}
|
||||
|
||||
async.parallel({
|
||||
isFollowing: function (next) {
|
||||
user.isFollowing(req.uid, userData.theirid, next);
|
||||
hasPrivateChat: function (next) {
|
||||
messaging.hasPrivateChat(req.uid, userData.uid, next);
|
||||
},
|
||||
posts: function (next) {
|
||||
posts.getPostSummariesFromSet('uid:' + userData.theirid + ':posts', req.uid, start, stop, next);
|
||||
@@ -72,10 +73,9 @@ profileController.get = function (req, res, callback) {
|
||||
userData.posts = results.posts.posts.filter(function (p) {
|
||||
return p && parseInt(p.deleted, 10) !== 1;
|
||||
});
|
||||
|
||||
userData.hasPrivateChat = results.hasPrivateChat;
|
||||
userData.aboutme = results.aboutme;
|
||||
userData.nextStart = results.posts.nextStart;
|
||||
userData.isFollowing = results.isFollowing;
|
||||
userData.breadcrumbs = helpers.buildBreadcrumbs([{text: userData.username}]);
|
||||
userData.title = userData.username;
|
||||
var pageCount = Math.ceil(userData.postcount / itemsPerPage);
|
||||
|
||||
@@ -444,6 +444,9 @@ var userNotifications = require('./user/notifications');
|
||||
};
|
||||
|
||||
Messaging.hasPrivateChat = function (uid, withUid, callback) {
|
||||
if (parseInt(uid, 10) === parseInt(withUid, 10)) {
|
||||
return callback(null, 0);
|
||||
}
|
||||
async.waterfall([
|
||||
function (next) {
|
||||
async.parallel({
|
||||
|
||||
Reference in New Issue
Block a user