chiark / gitweb /
When caching a status, cache its reblog too.
authorSimon Tatham <anakin@pobox.com>
Wed, 3 Jan 2024 16:26:46 +0000 (16:26 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 4 Jan 2024 06:58:23 +0000 (06:58 +0000)
That's another whole status, which we should be able to look up.

src/client.rs

index b9e05895572091990edc08ec43d209a33cd73c0d..fd1f667d7adca32538576f3c30ca1898f2a0e81b 100644 (file)
@@ -318,6 +318,9 @@ impl Client {
     fn cache_status(&mut self, st: &Status) {
         self.cache_account(&st.account);
         self.statuses.insert(st.id.to_string(), st.clone());
+        if let Some(ref sub) = st.reblog {
+            self.statuses.insert(sub.id.to_string(), *sub.clone());
+        }
     }
 
     fn cache_notification(&mut self, n: &Notification) {