forked from mirrors/treebird
Bookmark, mute, pin
FossilOrigin-Name: 44c17fa5a26634dd61c9ba15b4ca1e59705e26ca7898dd895c0a932a5c0d792b
This commit is contained in:
parent
064097c069
commit
28366b6f67
2 changed files with 30 additions and 3 deletions
12
src/status.c
12
src/status.c
|
@ -87,10 +87,22 @@ int try_interact_status(struct session* ssn, mastodont_t* api, char* id)
|
|||
mastodont_favourite_status(api, id, &storage, NULL);
|
||||
else if (strcmp(ssn->post.itype, "repeat") == 0)
|
||||
mastodont_reblog_status(api, id, &storage, NULL);
|
||||
else if (strcmp(ssn->post.itype, "bookmark") == 0)
|
||||
mastodont_bookmark_status(api, id, &storage, NULL);
|
||||
else if (strcmp(ssn->post.itype, "pin") == 0)
|
||||
mastodont_pin_status(api, id, &storage, NULL);
|
||||
else if (strcmp(ssn->post.itype, "mute") == 0)
|
||||
mastodont_mute_conversation(api, id, &storage, NULL);
|
||||
else if (strcmp(ssn->post.itype, "unlike") == 0)
|
||||
mastodont_unfavourite_status(api, id, &storage, NULL);
|
||||
else if (strcmp(ssn->post.itype, "unrepeat") == 0)
|
||||
mastodont_unreblog_status(api, id, &storage, NULL);
|
||||
else if (strcmp(ssn->post.itype, "unbookmark") == 0)
|
||||
mastodont_unbookmark_status(api, id, &storage, NULL);
|
||||
else if (strcmp(ssn->post.itype, "unpin") == 0)
|
||||
mastodont_unpin_status(api, id, &storage, NULL);
|
||||
else if (strcmp(ssn->post.itype, "unmute") == 0)
|
||||
mastodont_unmute_conversation(api, id, &storage, NULL);
|
||||
|
||||
mastodont_storage_cleanup(&storage);
|
||||
|
||||
|
|
|
@ -15,9 +15,24 @@
|
|||
%s
|
||||
<div class="menu">
|
||||
<ul>
|
||||
<li><a class="btn" href="#">Bookmark status</a></li>
|
||||
<li><a class="btn" href="#">View on instance</a></li>
|
||||
<li><a class="btn" href="#">Mute thread</a></li>
|
||||
<li>
|
||||
<form action="%s/status/%s/interact" method="post">
|
||||
<input type="hidden" name="itype" value="mute">
|
||||
<input type="submit" class="menu-btn" value="Mute">
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<form action="%s/status/%s/interact" method="post">
|
||||
<input type="hidden" name="itype" value="pin">
|
||||
<input type="submit" class="menu-btn" value="Pin">
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<form action="%s/status/%s/interact" method="post">
|
||||
<input type="hidden" name="itype" value="bookmark">
|
||||
<input type="submit" class="menu-btn" value="Bookmark">
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
|
|
Loading…
Reference in a new issue