koishi-plugin-minecraft-notifier 1.10.0 → 1.10.1

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.cjs +8 -6
  2. package/package.json +1 -1
package/lib/index.cjs CHANGED
@@ -785,6 +785,10 @@ async function checkVersionUpdate(ctx, cfg, articleRecord, notifierRecord, versi
785
785
  }
786
786
  const currentTryTime = articleRecord[tryTimeKey];
787
787
  const newVersion = notifierRecord[versionKey];
788
+ await updateArticleRecord(ctx, {
789
+ [versionKey]: newVersion,
790
+ latestVersion: newVersion
791
+ });
788
792
  const success = await processNewVersionArticle(
789
793
  ctx,
790
794
  cfg,
@@ -793,21 +797,19 @@ async function checkVersionUpdate(ctx, cfg, articleRecord, notifierRecord, versi
793
797
  );
794
798
  if (success) {
795
799
  await updateArticleRecord(ctx, {
796
- [versionKey]: newVersion,
797
- [tryTimeKey]: 0,
798
- latestVersion: newVersion
800
+ [tryTimeKey]: 0
799
801
  });
800
802
  return true;
801
803
  }
802
804
  const newTryTime = currentTryTime + 1;
803
805
  if (newTryTime >= 5) {
804
806
  await updateArticleRecord(ctx, {
805
- [versionKey]: newVersion,
806
- [tryTimeKey]: 0,
807
- latestVersion: newVersion
807
+ [tryTimeKey]: 0
808
808
  });
809
809
  } else {
810
810
  await updateArticleRecord(ctx, {
811
+ [versionKey]: articleRecord[versionKey],
812
+ latestVersion: articleRecord[versionKey],
811
813
  [tryTimeKey]: newTryTime
812
814
  });
813
815
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-minecraft-notifier",
3
3
  "description": "A Minecraft new version notification plugin, also featuring a PCL homepage.",
4
- "version": "1.10.0",
4
+ "version": "1.10.1",
5
5
  "main": "lib/index.cjs",
6
6
  "typings": "lib/index.d.ts",
7
7
  "type": "module",