I don’t want to use this approach in widgets:
$.ajax({
url: "/u/"+ username +".json",
dataType: 'json',
async: false,
success: function(data) {
....data.user.time_read;
Is there any other way to get this variable: time_read? This is an example.
from the template
discourse/app/assets/javascripts/discourse/templates/discovery.hbs
through
{{plugin-outlet name="discovery-list-container-top"
args=(hash category=category listLoading=loading)}}
no data is transmitted.
Is there any other way (other than json) to get this data (time_read, badge_count etc.)
Extras. currentUser does not have this data.
Thank