minor tweaks

This commit is contained in:
rimu 2024-05-28 15:40:09 +12:00
parent a299ed8efd
commit cf13ee0033
4 changed files with 10 additions and 9 deletions

View file

@ -2349,7 +2349,7 @@ def resolve_remote_post(uri: str, community_id: int, announce_actor=None) -> Uni
if post_request.status_code == 200:
post_data = post_request.json()
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()
if post:
return post

View file

@ -148,12 +148,10 @@
</ul>
{% endif %}
{% if not community.is_local() %}
<p>
<a href="{{ community.profile_id() }}">View community on original server</a>
</p>
<p>
<a href="/community/retrieve_remote_post/{{ community.id }}">Retrieve a post from the original server</a>
</p>
<ul>
<li><p><a href="{{ community.profile_id() }}">{{ _('View community on original server') }}</a></p></li>
<li><p><a href="{{ url_for('community.retrieve_remote_post', community_id=community.id) }}">{{ _('Retrieve a post from the original server') }}</a></p></li>
</ul>
{% endif %}
{% 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>

View file

@ -52,7 +52,10 @@
<td><p>{{ _('Results will have exactly that phrase in them.') }}</p></td>
</tr>
</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>