mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: add the first 3 participants in a private message
This commit is contained in:
@@ -13,11 +13,11 @@ class AvatarLookup
|
||||
|
||||
def self.lookup_columns
|
||||
@lookup_columns ||= [:id,
|
||||
:email,
|
||||
:username,
|
||||
:use_uploaded_avatar,
|
||||
:uploaded_avatar_template,
|
||||
:uploaded_avatar_id]
|
||||
:email,
|
||||
:username,
|
||||
:use_uploaded_avatar,
|
||||
:uploaded_avatar_template,
|
||||
:uploaded_avatar_id]
|
||||
end
|
||||
|
||||
def users
|
||||
@@ -27,12 +27,9 @@ class AvatarLookup
|
||||
def user_lookup_hash
|
||||
# adding tap here is a personal taste thing
|
||||
hash = {}
|
||||
User
|
||||
.where(:id => @user_ids)
|
||||
.select(AvatarLookup.lookup_columns)
|
||||
.each{|user|
|
||||
hash[user.id] = user
|
||||
}
|
||||
User.where(:id => @user_ids)
|
||||
.select(AvatarLookup.lookup_columns)
|
||||
.each{ |user| hash[user.id] = user }
|
||||
hash
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user