mirror of https://gitlab.com/brutaldon/brutaldon
Fix an issue with mentions caused by last update
This commit is contained in:
parent
aa1434e821
commit
7c351ef341
|
@ -193,5 +193,5 @@ SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
|
|||
ANONYMOUS_HOME_URL = 'about'
|
||||
|
||||
# Version number displayed on about page
|
||||
BRUTALDON_VERSION = "2.8.0"
|
||||
BRUTALDON_VERSION = "2.8.1"
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
required="" id="id_status"
|
||||
ic-post-to="{% url "user_search" %}"
|
||||
ic-trigger-on="keyup changed" ic-trigger-delay="500ms"
|
||||
ic-target="#username_autocomplete"></textarea>
|
||||
ic-target="#username_autocomplete">{% if form.status.value %}{{ form.status.value }}{% endif %}</textarea>
|
||||
<div id="username_autocomplete"></div>
|
||||
</div>
|
||||
<div id="status_count"></div>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
required="" id="id_status"
|
||||
ic-post-to="{% url "user_search" %}"
|
||||
ic-trigger-on="keyup changed" ic-trigger-delay="500ms"
|
||||
ic-target="#username_autocomplete"></textarea>
|
||||
ic-target="#username_autocomplete">{% if form.status.value %}{{ form.status.value }}{% endif %}</textarea>
|
||||
<div id="username_autocomplete"></div>
|
||||
</div>
|
||||
<div id="status_count"></div>
|
||||
|
|
|
@ -453,12 +453,10 @@ def toot(request, mention=None):
|
|||
if mention:
|
||||
if not mention.startswith('@'):
|
||||
mention = '@'+mention
|
||||
form = PostForm(request.GET, request.FILES,
|
||||
initial={'visibility': request.session['user'].source.privacy,
|
||||
'status': mention + '\n' })
|
||||
form = PostForm(initial={'visibility': request.session['user'].source.privacy,
|
||||
'status': mention + ' ' })
|
||||
else:
|
||||
form = PostForm(request.GET, request.FILES,
|
||||
initial={'visibility': request.session['user'].source.privacy})
|
||||
form = PostForm(initial={'visibility': request.session['user'].source.privacy})
|
||||
if request.GET.get('ic-request'):
|
||||
return render(request, 'intercooler/post.html',
|
||||
{'form': form,
|
||||
|
@ -590,7 +588,7 @@ def reply(request, id):
|
|||
initial_text = ""
|
||||
for mention in [x for x in toot.mentions if x.acct != request.session['user'].acct]:
|
||||
initial_text +=('@' + mention.acct + " ")
|
||||
form = PostForm({'status': initial_text,
|
||||
form = PostForm(initial={'status': initial_text,
|
||||
'visibility': toot.visibility,
|
||||
'spoiler_text': toot.spoiler_text})
|
||||
return render(request, 'main/reply.html',
|
||||
|
|
Loading…
Reference in New Issue