mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-20 17:55:53 +02:00
Lookup username and real name in various scenarios
This commit is contained in:
parent
f967ce1ce6
commit
ab12fb5d79
5 changed files with 28 additions and 14 deletions
|
@ -413,13 +413,13 @@ exports.FullScreenEditorModule = exports.getModule = class FullScreenEditorModul
|
|||
function populateLocalUserInfo(callback) {
|
||||
if(self.isPrivateMail()) {
|
||||
self.message.setLocalFromUserId(self.client.user.userId);
|
||||
|
||||
|
||||
if(self.toUserId > 0) {
|
||||
self.message.setLocalToUserId(self.toUserId);
|
||||
callback(null);
|
||||
} else {
|
||||
// we need to look it up
|
||||
User.getUserIdAndName(self.message.toUserName, function userInfo(err, toUserId) {
|
||||
User.getUserIdAndNameByLookup(self.message.toUserName, function userInfo(err, toUserId) {
|
||||
if(err) {
|
||||
callback(err);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue