mirror of
https://gitlab.com/brutaldon/brutaldon
synced 2025-02-17 03:51:02 +01:00
Correctly cancel out of (un)boosting or faving toots
This commit is contained in:
parent
804a4dfd67
commit
421d27ef07
@ -199,6 +199,7 @@ def fav(request, id):
|
|||||||
mastodon = get_mastodon(request)
|
mastodon = get_mastodon(request)
|
||||||
toot = mastodon.status(id)
|
toot = mastodon.status(id)
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
|
if not request.POST['cancel']:
|
||||||
if toot.favourited:
|
if toot.favourited:
|
||||||
mastodon.status_unfavourite(id)
|
mastodon.status_unfavourite(id)
|
||||||
else:
|
else:
|
||||||
@ -211,6 +212,7 @@ def boost(request, id):
|
|||||||
mastodon = get_mastodon(request)
|
mastodon = get_mastodon(request)
|
||||||
toot = mastodon.status(id)
|
toot = mastodon.status(id)
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
|
if not request.POST['cancel']:
|
||||||
if toot.reblogged:
|
if toot.reblogged:
|
||||||
mastodon.status_unreblog(id)
|
mastodon.status_unreblog(id)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user