diff options
author | cel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519> | 2020-05-14 20:34:20 -0400 |
---|---|---|
committer | cel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519> | 2020-05-15 18:33:59 -0400 |
commit | 25a7ff7a983188489590c05b7621393b68e8b002 (patch) | |
tree | 03a1f89222415945f57d7f71fad46f2fe0009768 | |
parent | 9914643b57307ebf026047fad554119165e99895 (diff) | |
download | patchfoo-25a7ff7a983188489590c05b7621393b68e8b002.tar.gz patchfoo-25a7ff7a983188489590c05b7621393b68e8b002.zip |
Render Feedless pub autofollows
-rw-r--r-- | lib/render-msg.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js index 20b9e15..a9040ee 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -844,12 +844,14 @@ RenderMsg.prototype.contact = function (cb) { var self = this // In message content, autofollow:true means following a pub in connection with using an invite code to it. pub:true means the author is a pub, responding to an invite code. But I think it makes more sense to switch the terms and call the follow from the pub auto-follow, since the pub does it automatically, and the follow from the one using an invite code pub-follow ("X follows pub Y") since it is to follow a pub. - // In scuttlebot before v8.4.0 (1ac0b9cf8214899baf0ba7ff4c0924d21a1b48cf), autofollow:true was used for both kinds of follows. We can detect that using the timestamp and/or the order of keys. + // In scuttlebot before v8.4.0 (1ac0b9cf8214899baf0ba7ff4c0924d21a1b48cf), autofollow:true was used for both kinds of follows. We can detect that using the timestamp and/or the order of keys. As of 2020-05-11 Feedless also uses the old behavior and is special-cased below. var pubFollow = self.c.following && self.c.autofollow var autoFollow = self.c.following && self.c.pub - if (pubFollow && self.msg.value.timestamp < 1469361582000 - && Object.keys(self.c).join() === 'type,contact,following,autofollow') { + if (pubFollow && ( + self.msg.value.timestamp < 1469361582000 + || self.msg.value.author === '@XTiE4EJSylnYbMKNVUIJczy5MMsJRhVp/YnPIG+Rruc=.ed25519' + ) && Object.keys(self.c).join() === 'type,contact,following,autofollow') { pubFollow = false autoFollow = true } |