Start displaying the acor that liked a particular note
This commit is contained in:
parent
a160a95e82
commit
8027a36359
4 changed files with 43 additions and 9 deletions
12
app.py
12
app.py
|
@ -464,7 +464,17 @@ def note_by_id(note_id):
|
|||
if data['meta'].get('deleted', False):
|
||||
abort(410)
|
||||
thread = _build_thread(data)
|
||||
return render_template('note.html', me=ME, thread=thread, note=data)
|
||||
|
||||
|
||||
likes = list(DB.inbox.find({
|
||||
'meta.undo': False,
|
||||
'type': ActivityType.LIKE.value,
|
||||
'$or': [{'activity.object.id': data['activity']['object']['id']},
|
||||
{'activity.object': data['activity']['object']['id']}],
|
||||
}))
|
||||
likes = [ACTOR_SERVICE.get(doc['activity']['actor']) for doc in likes]
|
||||
|
||||
return render_template('note.html', likes=likes, me=ME, thread=thread, note=data)
|
||||
|
||||
|
||||
@app.route('/nodeinfo')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue