minor functionality fixes

This commit is contained in:
Hugh Rundle 2021-12-05 18:09:51 +11:00
parent 4b55ffe99e
commit c77edab79c
No known key found for this signature in database
GPG key ID: CD23D6039184286B
2 changed files with 3 additions and 3 deletions

View file

@ -30,7 +30,7 @@
</div> </div>
</div> </div>
<div class="block"> <div class="block">
<p>{% blocktrans with username=user.display_name %}Follow {{ username }} from another Fediverse account like Bookwyrm, Mastodon, or Pleroma.{% endblocktrans %}</p> <p>{% blocktrans with username=user.display_name %}Follow {{ username }} from another Fediverse account like BookWyrm, Mastodon, or Pleroma.{% endblocktrans %}</p>
</div> </div>
<div class="card"> <div class="card">
<section class="card-content content"> <section class="card-content content">
@ -38,7 +38,7 @@
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="user" value="{{ user.id }}"> <input type="hidden" name="user" value="{{ user.id }}">
<label class="label" for="remote_user">{% trans 'User handle to follow from:' %}</label> <label class="label" for="remote_user">{% trans 'User handle to follow from:' %}</label>
<input class="input" type="text" name="remote_user" id="remote_user" placeholder="user@example.social"> <input class="input" type="text" name="remote_user" id="remote_user" placeholder="user@example.social" required>
<button class="button mt-1 is-primary" type="submit">{% trans 'Follow!' %}</button> <button class="button mt-1 is-primary" type="submit">{% trans 'Follow!' %}</button>
</form> </form>
</section> </section>

View file

@ -110,7 +110,7 @@ def ostatus_follow_request(request):
error = "ostatus_subscribe" error = "ostatus_subscribe"
# don't do these checks for AnonymousUser before they sign in # don't do these checks for AnonymousUser before they sign in
if request.user.id: if request.user.is_authenticated:
# you have blocked them so you probably don't want to follow # you have blocked them so you probably don't want to follow
if hasattr(request.user, "blocks") and user in request.user.blocks.all(): if hasattr(request.user, "blocks") and user in request.user.blocks.all():