mirror of
https://github.com/AMNatty/Mastodon-Circles.git
synced 2024-11-21 18:47:26 -07:00
f5c2fb7f2d
Like in *key, *oma users can react with arbitrary emojis. Unlike in *key, a single user can add multiple emoji reactions to a single post and favouriting still exists as a separate concept. By using only the Mastodon API for *oma, favourites still get interpreted but emoji reactions aren’t taken into account at all. Fix this by adding support for the relevant Pleroma APIs. To avoid a bias towards fav+react or multiple reacts on a single post and to be more similar to connection strengths in Mastodon and *key, aggregate reacts and favs and count them only once per per user and post. It is not clear whether the existence of a non-empty pleroma/emoji_reactions field in notes data already implies support for the reactions API endpoint. It at least seems sensible and would allow to skip the initial feature metadata check, but let’s stick to the safe approach for now. Fedibird also supports emoji reacts and (like Akkoma >= 3.2.0) provides the emoji_reactions sections at the toplevel of notes with an array of account IDs included for every reaction. At first glance Fedibird doesn't seem to provide a /reactions API or similar with more detailed user info directly included. Supporting Fedibird would thereofore require additional user info lookups at the end. This commit makes no attempt at supporting Fedibird or taking advantage of the account_ids array for Akkoma. Co-authored-by: Natty <natty.sh.git@gmail.com>
53 lines
No EOL
2.6 KiB
HTML
53 lines
No EOL
2.6 KiB
HTML
|
|
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<meta charset="UTF-8">
|
|
<title>Fedi Circle Creator</title>
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<link rel="stylesheet" href="style.css">
|
|
<style>
|
|
</style>
|
|
<script src=""></script>
|
|
<body>
|
|
<script src="create-circle.js"></script>
|
|
<script src="image.js"></script>
|
|
<h1>Trötpty</h1>
|
|
<h3><span style="text-decoration: line-through" aria-hidden="true">Mastodon</span> Fedi Circle Creator</h3>
|
|
<!-- TODO Logo? -->
|
|
<form id="generateForm" onsubmit="(async () => await circleMain())(); return false;">
|
|
<input id="txt_mastodon_handle" type="text" onchange="document.getElementById('btn_create').style = 'display: inline;'; document.getElementById('btn_download').style = 'display: none;'" placeholder="@sonnenbrandi@mieke.club">
|
|
<br><br>
|
|
<span>
|
|
<label><input type="radio" name="backend" value="detect" autocomplete="off" checked> Autodetect</label>
|
|
<label><input type="radio" name="backend" value="mastodon" autocomplete="off"> Mastodon API</label>
|
|
<label><input type="radio" name="backend" value="misskey" autocomplete="off"> Misskey API</label>
|
|
<label><input type="radio" name="backend" value="pleroma" autocomplete="off"> Pleroma API</label>
|
|
</span>
|
|
<br>
|
|
<button type="submit" id="generateButton">Generate circle</button>
|
|
</form>
|
|
<span id="outInfo"></span>
|
|
<a href="" id="btn_download" class="button" download="mastodon-circle.png" style="display: none;">DOWNLOAD (klappt wsl nicht)</a>
|
|
<!-- <button id="btn_download" onClick="downloadImage()" style="display: none;">DOWNLOAD</button> -->
|
|
<br><br>
|
|
<!-- Canvas for the final Image -->
|
|
<canvas id="canvas" width="1000" height="1000"></canvas>
|
|
<br>
|
|
<!-- List of all people in Circle -->
|
|
<div id="usersDiv">
|
|
<div id="ud1" class="userSubDiv"></div>
|
|
<div id="ud2" class="userSubDiv"></div>
|
|
<div id="ud3" class="userSubDiv"></div>
|
|
</div>
|
|
<br><br><br>
|
|
<div id="credits" style="width: 100%;">
|
|
<p>Contribute on <a href="https://github.com/AMNatty/Mastodon-Circles">Github</a> </p>
|
|
<p>Thanks to <a href="https://twitter.com/duiker101">Duiker101</a> for creating chirpty for Twitter</p>
|
|
<p>Original on <a href="https://github.com/andigandhi/Mastodon-Circles">Github</a> </p>
|
|
</div>
|
|
<!-- output for further projects ;) -->
|
|
<div id="outDiv" style="display: none;"></div>
|
|
<!-- Preload the background image -->
|
|
<div style="display:none;"><img id="mieke_bg" src="mieke_bg.jpg" width="1000" height="1000" /></div>
|
|
</body>
|
|
</html> |