From 9eb2f672f9b1d26559c2f83596e8d80a352d7611 Mon Sep 17 00:00:00 2001 From: grunfink Date: Sun, 14 Sep 2025 00:30:00 +0200 Subject: mastoapi: Fixed incorrect messages in status query. --- mastoapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mastoapi.c b/mastoapi.c index 568426b..e77d15f 100644 --- a/mastoapi.c +++ b/mastoapi.c @@ -1767,7 +1767,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, if (valid_status(timeline_get_by_md5(&snac2, v, &msg))) { /* add only posts by the author */ if (strcmp(xs_dict_get(msg, "type"), "Note") == 0 && - xs_startswith(xs_dict_get(msg, "id"), snac2.actor)) { + xs_startswith(xs_dict_get(msg, "id"), snac2.actor) && is_msg_public(msg)) { xs *st = mastoapi_status(&snac2, msg); if (st) -- cgit v1.2.3 From 2656f69d7c7c178fba4b1eb7941771d5b97924e2 Mon Sep 17 00:00:00 2001 From: grunfink Date: Sun, 14 Sep 2025 00:50:46 +0200 Subject: More work in replies pages. --- activitypub.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/activitypub.c b/activitypub.c index 05c3fb1..0bf4379 100644 --- a/activitypub.c +++ b/activitypub.c @@ -3502,6 +3502,8 @@ int activitypub_get_handler(const xs_dict *req, const char *q_path, p_path = xs_list_get(l, 2); + const xs_dict *q_vars = xs_dict_get(req, "q_vars"); + *ctype = "application/activity+json"; int show_contact_metrics = xs_is_true(xs_dict_get(snac.config, "show_contact_metrics")); @@ -3595,7 +3597,15 @@ int activitypub_get_handler(const xs_dict *req, const char *q_path, if (!is_msg_public(obj)) status = HTTP_STATUS_NOT_FOUND; else + if (xs_dict_get(q_vars, "page")) msg = msg_replies(&snac, id, 1); + else { + const xs_dict *replies = xs_dict_get(obj, "replies"); + if (xs_is_dict(replies)) { + msg = xs_dup(replies); + msg = xs_dict_set(msg, "@context", "https:/""/www.w3.org/ns/activitystreams"); + } + } } else status = HTTP_STATUS_NOT_FOUND; -- cgit v1.2.3 From 31a4b180270d8f6c698491bd533444203953d626 Mon Sep 17 00:00:00 2001 From: grunfink Date: Wed, 17 Sep 2025 20:52:47 +0200 Subject: Tweaked logging message. --- activitypub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activitypub.c b/activitypub.c index 0bf4379..b4c6eaa 100644 --- a/activitypub.c +++ b/activitypub.c @@ -3156,7 +3156,7 @@ void process_queue_item(xs_dict *q_item) } if (instance_failure(inbox, 0)) { - srv_debug(1, xs_fmt("too many failures for instance %s", inbox)); + srv_debug(1, xs_fmt("output message error: too many failures for instance %s", inbox)); return; } -- cgit v1.2.3 From 3a4c6d91ab5a5bc393bbe5655746021315c1aca1 Mon Sep 17 00:00:00 2001 From: Dejavu Moe Date: Fri, 19 Sep 2025 07:30:11 +0800 Subject: update i18n:zh.po modified: po/zh.po --- po/zh.po | 56 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/po/zh.po b/po/zh.po index f9852b9..4005c42 100644 --- a/po/zh.po +++ b/po/zh.po @@ -22,11 +22,11 @@ msgstr "只有提及到的人:" #: html.c:446 msgid "Reply to (URL): " -msgstr "回复给(网址):" +msgstr "回复给(URL)" #: html.c:455 msgid "Don't send, but store as a draft" -msgstr "不要发送,但是保存为草稿" +msgstr "不发送,但保存为草稿" #: html.c:456 msgid "Draft:" @@ -54,7 +54,7 @@ msgstr "投票..." #: html.c:620 msgid "Poll options (one per line, up to 8):" -msgstr "投票选项(每项一行,最多八项):" +msgstr "投票选项(每行一项,最多八项):" #: html.c:632 msgid "One choice" @@ -78,7 +78,7 @@ msgstr "一天后结束" #: html.c:656 msgid "Post" -msgstr "" +msgstr "发布" #: html.c:758 html.c:765 msgid "Site description" @@ -86,7 +86,7 @@ msgstr "站点描述" #: html.c:776 msgid "Admin email" -msgstr "管理员电子邮箱" +msgstr "管理员邮箱" #: html.c:789 msgid "Admin account" @@ -126,11 +126,11 @@ msgid "" "Search posts by URL or content (regular expression), @user@host accounts, or " "#tag" msgstr "" -"通过网址、内容(正则表达式)、@用户@服务器 帐号,或者 #话题标签搜索贴子" +"通过 URL、内容(正则表达式)、@<用户名>@<主机名>帐号,或者 #话题标签 搜索贴子" #: html.c:1019 msgid "Content search" -msgstr "内容搜索" +msgstr "搜索内容" #: html.c:1145 msgid "verified link" @@ -158,7 +158,7 @@ msgstr "关注" #: html.c:1262 msgid "(by URL or user@host)" -msgstr "(通过网址或者 用户名@服务器)" +msgstr "(通过 URL 或者 <用户名>@<主机名>)" #: html.c:1277 html.c:1857 html.c:4678 msgid "Boost" @@ -166,7 +166,7 @@ msgstr "转发" #: html.c:1279 html.c:1296 msgid "(by URL)" -msgstr "(通过网址)" +msgstr "(通过 URL)" #: html.c:1294 html.c:1836 html.c:4669 msgid "Like" @@ -218,11 +218,11 @@ msgstr "用于通知的电子邮箱地址" #: html.c:1484 msgid "Telegram notifications (bot key and chat id):" -msgstr "Telegram通知(bot密钥和聊天ID)" +msgstr "Telegram 通知(bot 密钥和聊天 ID)" #: html.c:1498 msgid "ntfy notifications (ntfy server and token):" -msgstr "ntfy通知(ntfy服务器和令牌):" +msgstr "ntfy 通知(ntfy 服务器和令牌):" #: html.c:1520 msgid "Maximum days to keep posts (0: server settings):" @@ -282,15 +282,15 @@ msgstr "更新用户信息:" #: html.c:1663 msgid "Followed hashtags..." -msgstr "已关注的话题标签..." +msgstr "关注的标签..." #: html.c:1665 html.c:1698 msgid "One hashtag per line" -msgstr "每行一个话题标签" +msgstr "每行一个标签" #: html.c:1687 html.c:1719 msgid "Update hashtags" -msgstr "更新话题标签" +msgstr "更新标签" #: html.c:1836 msgid "Say you like this post" @@ -702,9 +702,9 @@ msgid "" "Option 3...\n" "..." msgstr "" -"选项1...\n" -"选项2...\n" -"选项3...\n" +"选项 1...\n" +"选项 2...\n" +"选项 3...\n" "..." #: html.c:1490 @@ -713,15 +713,15 @@ msgstr "Bot API 密钥" #: html.c:1496 msgid "Chat id" -msgstr "聊天ID" +msgstr "聊天 ID" #: html.c:1504 msgid "ntfy server - full URL (example: https://ntfy.sh/YourTopic)" -msgstr "ntfy服务器 - 完整网址(例如:https://ntft.sh/YourTopic)" +msgstr "ntfy 服务器 - 完整网址(例如:https://ntft.sh/YourTopic)" #: html.c:1510 msgid "ntfy token - if needed" -msgstr "ntft令牌 - 如果需要的话" +msgstr "ntft 令牌 - 如果需要的话" #: html.c:3009 msgid "pinned" @@ -737,31 +737,31 @@ msgstr "草稿" #: html.c:516 msgid "Scheduled post..." -msgstr "" +msgstr "计划发布定时贴文" msgid "Post date and time:" -msgstr "" +msgstr "发布日期和时间" #: html.c:3044 html.c:4137 msgid "Scheduled posts" -msgstr "" +msgstr "已发布的定时帖文" #: html.c:3045 msgid "scheduled posts" -msgstr "" +msgstr "计划发布定时贴文" #: html.c:510 #, c-format msgid "Post date and time (timezone: %s):" -msgstr "" +msgstr "发布日期和时间(时区: %s)" #: html.c:1621 msgid "Time zone:" -msgstr "" +msgstr "时区" #: html.c:491 msgid "Language:" -msgstr "" +msgstr "语言" #: html.c:1512 msgid "Notify webhook:" @@ -773,7 +773,7 @@ msgstr "" #: html.c:1626 msgid "Languages you usually post in:" -msgstr "" +msgstr "您通常使用的语言:" #: html.c:1632 msgid "en fr es de_AT" -- cgit v1.2.3 From 0f2e4c289d11e52a75d2477997b74738a8699ce3 Mon Sep 17 00:00:00 2001 From: Dejavu Moe Date: Fri, 19 Sep 2025 07:33:33 +0800 Subject: update po/zh.po correct a missing colon --- po/zh.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/zh.po b/po/zh.po index 4005c42..f94b2b8 100644 --- a/po/zh.po +++ b/po/zh.po @@ -22,7 +22,7 @@ msgstr "只有提及到的人:" #: html.c:446 msgid "Reply to (URL): " -msgstr "回复给(URL)" +msgstr "回复给(URL):" #: html.c:455 msgid "Don't send, but store as a draft" -- cgit v1.2.3 From 14f71ab47f0452a8f880fbaf2707227bca29a87c Mon Sep 17 00:00:00 2001 From: grunfink Date: Fri, 19 Sep 2025 10:05:37 +0200 Subject: Updated RELEASE_NOTES. --- RELEASE_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index c1c4531..d2caabc 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,6 +1,6 @@ # Release Notes -## UNRELEASED +## 2.83 After receiving a follow confirmation, a bunch of posts from that account are requested and inserted into the timeline as context. -- cgit v1.2.3 From 91b217e212abd67d597f8a667c879643e8a015d6 Mon Sep 17 00:00:00 2001 From: grunfink Date: Fri, 19 Sep 2025 10:06:00 +0200 Subject: Version 2.83 RELEASED. --- snac.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snac.h b/snac.h index 0027b59..1a58e0b 100644 --- a/snac.h +++ b/snac.h @@ -1,7 +1,7 @@ /* snac - A simple, minimalistic ActivityPub instance */ /* copyright (c) 2022 - 2025 grunfink et al. / MIT license */ -#define VERSION "2.83-dev" +#define VERSION "2.83" #define USER_AGENT "snac/" VERSION -- cgit v1.2.3 From 32b885ef7451199d9c4277d56a020c1f35eee589 Mon Sep 17 00:00:00 2001 From: pmjv Date: Fri, 19 Sep 2025 15:48:23 +0200 Subject: Update po/cs.po --- po/cs.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/po/cs.po b/po/cs.po index 76088f9..b00e6fd 100644 --- a/po/cs.po +++ b/po/cs.po @@ -762,20 +762,20 @@ msgstr "Časové pásmo:" #: html.c:491 msgid "Language:" -msgstr "" +msgstr "Jazyk:" #: html.c:1512 msgid "Notify webhook:" -msgstr "" +msgstr "Notify webhook:" #: html.c:1518 msgid "http://example.com/webhook" -msgstr "" +msgstr "http://priklad.cz/webhook" #: html.c:1626 msgid "Languages you usually post in:" -msgstr "" +msgstr "Jazyky ve kterých píšete:" #: html.c:1632 msgid "en fr es de_AT" -msgstr "" +msgstr "cs en fr de_AT" -- cgit v1.2.3