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:
|
if inner_type:
|
||||||
type = inner_type
|
type = inner_type
|
||||||
|
|
||||||
|
# AS1 verb => human-readable phrase
|
||||||
phrases = {
|
phrases = {
|
||||||
|
'accept': 'accepted',
|
||||||
'article': 'posted',
|
'article': 'posted',
|
||||||
'comment': 'replied',
|
'comment': 'replied',
|
||||||
'delete': 'deleted',
|
'delete': 'deleted',
|
||||||
|
@ -1300,7 +1302,8 @@ def fetch_objects(query, by=None, user=None):
|
||||||
handle = did_to_handle(handle) or handle
|
handle = did_to_handle(handle) or handle
|
||||||
content = f'@{handle}{suffix}'
|
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')
|
obj.content = (obj_as1.get('content')
|
||||||
or obj_as1.get('displayName')
|
or obj_as1.get('displayName')
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
<div class="e-content col-xs-{{ 5 if show_users else 8 }}">
|
<div class="e-content col-xs-{{ 5 if show_users else 8 }}">
|
||||||
{{ obj.actor_link(user=user)|safe }}
|
{{ obj.actor_link(user=user)|safe }}
|
||||||
{{ obj.phrase|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) }}
|
{{ obj.content|default('--', true)|striptags|truncate(50) }}
|
||||||
</a>
|
{% if obj.url %}</a>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if show_users %}
|
{% if show_users %}
|
||||||
|
|
Ładowanie…
Reference in New Issue