fix: quote counts in the counts line; remove dead editor scripts and files (v2.14.2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
PhilandClaude Opus 5.5 committed 2026-11-10 15:54:46 -07:00
1 parent 88aea09e04
commit d354dc9733
18 files changed
+106 -60

No files matched your search

+2 -2
View File
@@ -465,5 +465,5 @@ def create_app(config=None):
# Package version (Semantic Versioning 2.0.0)
# See docs/standards/versioning-strategy.md for details
__version__ = "2.14.1"
__version_info__ = (2, 14, 1)
__version__ = "2.14.2"
__version_info__ = (2, 14, 2)
+1 -2
View File
@@ -1074,8 +1074,7 @@ def get_targets() -> Dict[str, Target]:
if token:
client = _client_cache.get("threads")
if client is None or client.config_token != token:
client = ThreadsClient(token, Path(config["DATA_PATH"]) / "threads_token.json",
api=config.get("THREADS_API") or THREADS_API)
client = ThreadsClient(token, Path(config["DATA_PATH"]) / "threads_token.json")
_client_cache["threads"] = client
username = (config.get("THREADS_USERNAME") or "").lstrip("@")
targets["threads"] = Target(
+8 -5
View File
@@ -112,7 +112,8 @@ def get_webmentions_for_note(note_id: int) -> Dict[str, List[Dict[str, Any]]]:
def response_counts(note_ids: List[int]) -> Dict[int, Dict[str, int]]:
"""
Likes, reposts and replies per note, for lists of notes (v2.13.4).
Likes, reposts, replies and quotes per note, for lists of notes
(v2.13.4; quotes v2.14.2).
Shown responses (valid and approved) plus the counts silos give without
names (Threads; people who opted out of backfeed) on synced crossposts.
@@ -126,21 +127,22 @@ def response_counts(note_ids: List[int]) -> Dict[int, Dict[str, int]]:
def add(note_id, key, n):
if n:
counts.setdefault(note_id, {'likes': 0, 'reposts': 0, 'replies': 0})[key] += n
counts.setdefault(note_id, {'likes': 0, 'reposts': 0, 'replies': 0, 'quotes': 0})[key] += n
for row in db.execute(
f"""
SELECT target_note_id, mention_type, COUNT(*) FROM webmentions
WHERE target_note_id IN ({marks}) AND validation_status = 'valid'
AND moderation_status = 'approved' AND mention_type IN ('like', 'repost', 'reply')
AND moderation_status = 'approved' AND mention_type IN ('like', 'repost', 'reply', 'quote')
GROUP BY target_note_id, mention_type
""",
note_ids,
):
add(row[0], {'like': 'likes', 'repost': 'reposts', 'reply': 'replies'}[row[1]], row[2])
add(row[0], {'like': 'likes', 'repost': 'reposts', 'reply': 'replies', 'quote': 'quotes'}[row[1]], row[2])
for row in db.execute(
f"""
SELECT note_id, SUM(COALESCE(likes_count, 0)), SUM(COALESCE(reposts_count, 0))
SELECT note_id, SUM(COALESCE(likes_count, 0)), SUM(COALESCE(reposts_count, 0)),
SUM(COALESCE(quotes_count, 0))
FROM syndications WHERE note_id IN ({marks}) AND state = 'synced'
GROUP BY note_id
""",
@@ -148,6 +150,7 @@ def response_counts(note_ids: List[int]) -> Dict[int, Dict[str, int]]:
):
add(row[0], 'likes', row[1])
add(row[0], 'reposts', row[2])
add(row[0], 'quotes', row[3])
return counts