diff --git a/brutaldon/templates/main/user.html b/brutaldon/templates/main/user.html index bc755f0..55735c4 100644 --- a/brutaldon/templates/main/user.html +++ b/brutaldon/templates/main/user.html @@ -55,6 +55,10 @@ Brutaldon - {{ timeline }} timelime href="{{ user.url }}" title="home"> + + +
{% if not relationship.muting %} diff --git a/brutaldon/urls.py b/brutaldon/urls.py index 191c4cc..5fb039b 100644 --- a/brutaldon/urls.py +++ b/brutaldon/urls.py @@ -40,6 +40,7 @@ urlpatterns = [ path('thread/', views.thread, name='thread'), path('tags/', views.tag, name='tag'), path('user/', views.user, name='user'), + path('toot/', views.toot, name='toot'), path('toot', views.toot, name="toot"), path('reply/', views.reply, name='reply'), path('fav/', views.fav, name='fav'), diff --git a/brutaldon/views.py b/brutaldon/views.py index d78778f..508b5be 100644 --- a/brutaldon/views.py +++ b/brutaldon/views.py @@ -292,9 +292,15 @@ def settings(request): { 'form': form, 'fullbrutalism': fullbrutalism_p(request)}) @never_cache -def toot(request): +def toot(request, mention=None): if request.method == 'GET': - form = PostForm(initial={'visibility': request.session['user'].source.privacy}) + if mention: + if not mention.startswith('@'): + mention = '@'+mention + form = PostForm(initial={'visibility': request.session['user'].source.privacy, + 'status': mention + '\n' }) + else: + form = PostForm(initial={'visibility': request.session['user'].source.privacy}) return render(request, 'main/post.html', {'form': form, 'fullbrutalism': fullbrutalism_p(request)})