ソースを参照

Transition to ID-only RSS GUIDs on Dec 14, 2025

Fixes #447
Zed 9 ヶ月 前
コミット
064ec88080
1 ファイル変更8 行追加0 行削除
  1. 8 0
      src/views/rss.nimf

+ 8 - 0
src/views/rss.nimf

@@ -2,6 +2,9 @@
 ## SPDX-License-Identifier: AGPL-3.0-only
 #import strutils, xmltree, strformat, options, unicode
 #import ../types, ../utils, ../formatters, ../prefs
+## Snowflake ID cutoff for RSS GUID format transition
+## Corresponds to approximately December 14, 2025 UTC
+#const guidCutoff = 2000000000000000000'i64
 #
 #proc getTitle(tweet: Tweet; retweet: string): string =
 #if tweet.pinned: result = "Pinned: "
@@ -101,12 +104,17 @@ ${renderRssTweet(quoteTweet, cfg)}
 #    if link in links: continue
 #    end if
 #    links.add link
+#    let useGlobalGuid = tweet.id >= guidCutoff
       <item>
         <title>${getTitle(tweet, retweet)}</title>
         <dc:creator>@${tweet.user.username}</dc:creator>
         <description><![CDATA[${renderRssTweet(tweet, cfg).strip(chars={'\n'})}]]></description>
         <pubDate>${getRfc822Time(tweet)}</pubDate>
+#if useGlobalGuid:
+        <guid isPermaLink="false">${tweet.id}</guid>
+#else:
         <guid>${urlPrefix & link}</guid>
+#end if
         <link>${urlPrefix & link}</link>
       </item>
 #  end for