kopia lustrzana https://github.com/snarfed/bridgy-fed
rodzic
374af3aa5c
commit
86ad33b896
|
@ -1230,7 +1230,9 @@ def fetch_objects(query, by=None, user=None):
|
|||
if inner_type:
|
||||
type = inner_type
|
||||
|
||||
# AS1 verb => human-readable phrase
|
||||
phrases = {
|
||||
'accept': 'accepted',
|
||||
'article': 'posted',
|
||||
'comment': 'replied',
|
||||
'delete': 'deleted',
|
||||
|
@ -1300,7 +1302,8 @@ def fetch_objects(query, by=None, user=None):
|
|||
handle = did_to_handle(handle) or handle
|
||||
content = f'@{handle}{suffix}'
|
||||
|
||||
content = common.pretty_link(url, text=content, user=user)
|
||||
if url:
|
||||
content = common.pretty_link(url, text=content, user=user)
|
||||
|
||||
obj.content = (obj_as1.get('content')
|
||||
or obj_as1.get('displayName')
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<div class="e-content col-xs-{{ 5 if show_users else 8 }}">
|
||||
{{ obj.actor_link(user=user)|safe }}
|
||||
{{ obj.phrase|safe }}
|
||||
<a target="_blank" href="{{ obj.url }}" class="u-url">
|
||||
{% if obj.url %}<a target="_blank" href="{{ obj.url }}" class="u-url">{% endif %}
|
||||
{{ obj.content|default('--', true)|striptags|truncate(50) }}
|
||||
</a>
|
||||
{% if obj.url %}</a>{% endif %}
|
||||
</div>
|
||||
|
||||
{% if show_users %}
|
||||
|
|
Ładowanie…
Reference in New Issue