mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
FIX: topic.lastPoster should be based on the 'latest' extra
This commit is contained in:
@@ -13,15 +13,10 @@ const Topic = RestModel.extend({
|
||||
return poster && poster.user;
|
||||
},
|
||||
|
||||
@computed('posters.lastObject')
|
||||
lastPoster(poster) {
|
||||
if (poster){
|
||||
if (this.last_poster_username === poster.user.username){
|
||||
return poster.user;
|
||||
} else {
|
||||
return this.get('creator');
|
||||
}
|
||||
}
|
||||
@computed('posters.@each')
|
||||
lastPoster(posters) {
|
||||
const latest = posters.filter(p => p.extras && p.extras.indexOf("latest") >= 0)[0];
|
||||
return latest.user;
|
||||
},
|
||||
|
||||
@computed('fancy_title')
|
||||
|
||||
Reference in New Issue
Block a user