koishi-plugin-nitter 0.0.14 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +5 -5
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -298,7 +298,7 @@ function apply(ctx, config) {
298
298
  config.nitterUrl = config.nitterUrl.replace(/\/+$/, "");
299
299
  const twitterClient = new import_rettiwt_api.Rettiwt({
300
300
  apiKey: config.apiKey,
301
- proxyUrl: config.proxy ? new URL(config.proxy) : void 0,
301
+ proxy: config.proxy,
302
302
  logging: true
303
303
  });
304
304
  let cronJob;
@@ -420,7 +420,8 @@ function apply(ctx, config) {
420
420
  async function getFollowedFeed() {
421
421
  let tweetList;
422
422
  await retry(5, async () => {
423
- ({ list: tweetList } = await twitterClient.user.followed());
423
+ const raw = await twitterClient.user.followed();
424
+ tweetList = raw.list;
424
425
  }, (err) => ctx.logger("nitter").error(`获取推文列表失败: ${err}`));
425
426
  if (!tweetList) return [];
426
427
  return tweetList.reverse();
@@ -529,7 +530,7 @@ function apply(ctx, config) {
529
530
  boxSizing: "border-box",
530
531
  overflow: "hidden",
531
532
  width: "100%",
532
- padding: "10px 10px 0 10px",
533
+ padding: "20px 20px 10px 20px",
533
534
  backgroundColor: "#fff"
534
535
  });
535
536
  });
@@ -550,8 +551,7 @@ function apply(ctx, config) {
550
551
  omitBackground: false,
551
552
  clip: boundingBox
552
553
  });
553
- const pieces = [{ type: "account", text: `${captured.accountText}
554
- https://x.com/i/status/${tweetId}` }];
554
+ const pieces = [{ type: "account", text: `${captured.accountText}` }];
555
555
  for (const item of captured.flow) {
556
556
  if (item.type === "text") {
557
557
  const t = translatedTexts[item.textIndex] || item.fallbackText || "";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-nitter",
3
3
  "description": "使用Rettiwt-API订阅推文,并使用nitter渲染",
4
- "version": "0.0.14",
4
+ "version": "0.0.15",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [