Lookup username and real name in various scenarios

This commit is contained in:
Bryan Ashby 2018-01-05 22:03:33 -07:00
parent f967ce1ce6
commit ab12fb5d79
5 changed files with 28 additions and 14 deletions

View file

@ -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 {