mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 03:43:42 -08:00
minor tweaks
This commit is contained in:
parent
a299ed8efd
commit
cf13ee0033
4 changed files with 10 additions and 9 deletions
|
@ -2349,7 +2349,7 @@ def resolve_remote_post(uri: str, community_id: int, announce_actor=None) -> Uni
|
||||||
if post_request.status_code == 200:
|
if post_request.status_code == 200:
|
||||||
post_data = post_request.json()
|
post_data = post_request.json()
|
||||||
post_request.close()
|
post_request.close()
|
||||||
# check again that it doesn't already exist (can happen with different but equivilent URLs)
|
# check again that it doesn't already exist (can happen with different but equivalent URLs)
|
||||||
post = Post.query.filter_by(ap_id=post_data['id']).first()
|
post = Post.query.filter_by(ap_id=post_data['id']).first()
|
||||||
if post:
|
if post:
|
||||||
return post
|
return post
|
||||||
|
|
|
@ -148,12 +148,10 @@
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if not community.is_local() %}
|
{% if not community.is_local() %}
|
||||||
<p>
|
<ul>
|
||||||
<a href="{{ community.profile_id() }}">View community on original server</a>
|
<li><p><a href="{{ community.profile_id() }}">{{ _('View community on original server') }}</a></p></li>
|
||||||
</p>
|
<li><p><a href="{{ url_for('community.retrieve_remote_post', community_id=community.id) }}">{{ _('Retrieve a post from the original server') }}</a></p></li>
|
||||||
<p>
|
</ul>
|
||||||
<a href="/community/retrieve_remote_post/{{ community.id }}">Retrieve a post from the original server</a>
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if community.local_only %}
|
{% if community.local_only %}
|
||||||
<p>{{ _('Only people on %(instance_name)s can post or reply in this community.', instance_name=current_app.config['SERVER_NAME']) }}</p>
|
<p>{{ _('Only people on %(instance_name)s can post or reply in this community.', instance_name=current_app.config['SERVER_NAME']) }}</p>
|
||||||
|
|
|
@ -52,7 +52,10 @@
|
||||||
<td><p>{{ _('Results will have exactly that phrase in them.') }}</p></td>
|
<td><p>{{ _('Results will have exactly that phrase in them.') }}</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<h6 class="mt-5">{{ _('Trying to add a communitiy or post from another instance?') }} </h6>
|
||||||
|
<p>{{ _('In many types of federated platforms you can put a URL of a post or community into the search in order to add it to your local instance. In PieFed the search is just for searching.') }}</p>
|
||||||
|
<p><a href="{{ url_for('community.add_remote') }}" class="btn btn-primary">{{ _('Add remote community') }}</a></p>
|
||||||
|
<p>{{ _('To add a post from a remote instance, find the community in PieFed then look for the "Retrieve a post from the original server" link.') }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue