Compare commits
12 Commits
41dc68340f
...
2026.4.3
| Author | SHA1 | Date | |
|---|---|---|---|
| 16b1b9d2ab | |||
| f0246d7ce9 | |||
| 165500e71d | |||
| 4f2be0e0ed | |||
| 7f2ef21557 | |||
| b33b998ae4 | |||
| e17da1686d | |||
| ab06f4ceec | |||
| 47fe174ac6 | |||
| 747bf00e7b | |||
| 3baa55bd29 | |||
| 90e9d614f9 |
@@ -1,3 +1,13 @@
|
|||||||
|
# 2026.4.3
|
||||||
|
- Chg: forループ内でlastReadを記録するように
|
||||||
|
- Chg: lastReadを時刻ベースに
|
||||||
|
|
||||||
|
# 2026.4.2
|
||||||
|
- Fix: id除外が機能しない問題
|
||||||
|
|
||||||
|
# 2026.4.1
|
||||||
|
- Chg: notificationsもfor内でlastReadを更新しないように
|
||||||
|
|
||||||
# 2026.4.0
|
# 2026.4.0
|
||||||
- Breaking: noticeUwuzuを0から作り直しました
|
- Breaking: noticeUwuzuを0から作り直しました
|
||||||
- Breaking: 25.12.0-alpha.1までの方針を全て廃止しました
|
- Breaking: 25.12.0-alpha.1までの方針を全て廃止しました
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ uwuzu v1.6.3以上で利用可能です。
|
|||||||
- 地震情報のWebSocketの接続先をテスト用サンドボックスに変更
|
- 地震情報のWebSocketの接続先をテスト用サンドボックスに変更
|
||||||
P2P地震情報の接続先を本番環境から[テスト用サンドボックスのエンドポイント](https://www.p2pquake.net/develop/json_api_v2/)に変更します。
|
P2P地震情報の接続先を本番環境から[テスト用サンドボックスのエンドポイント](https://www.p2pquake.net/develop/json_api_v2/)に変更します。
|
||||||
そのため、最新の情報は配信されません。
|
そのため、最新の情報は配信されません。
|
||||||
|
- 地震情報のid除外を無効化
|
||||||
|
地震情報のid除外を記録も確認も行わなくなります。
|
||||||
- i18nextのdebugを有効化
|
- i18nextのdebugを有効化
|
||||||
[i18nextでのdebug](https://www.i18next.com/overview/configuration-options#logging)が有効化されます。
|
[i18nextでのdebug](https://www.i18next.com/overview/configuration-options#logging)が有効化されます。
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "notice-uwuzu",
|
"name": "notice-uwuzu",
|
||||||
"version": "2026.4.0",
|
"version": "2026.4.3",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -32,9 +32,6 @@ try {
|
|||||||
if (notification.category !== "reply" || typeof notification.valueid !== "string")
|
if (notification.category !== "reply" || typeof notification.valueid !== "string")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (lastReadReply === notification.valueid)
|
|
||||||
break;
|
|
||||||
|
|
||||||
const ueuseResponse = await client.request("ueuse/get", {
|
const ueuseResponse = await client.request("ueuse/get", {
|
||||||
uniqid: notification.valueid,
|
uniqid: notification.valueid,
|
||||||
});
|
});
|
||||||
@@ -44,12 +41,17 @@ try {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const time = new Date(ueuseResponse.data[0].datetime).getTime();
|
||||||
|
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
const mem = Memory.memory;
|
const mem = Memory.memory;
|
||||||
mem.lastReadReply = ueuseResponse.data[0].uniqid;
|
mem.lastReadReply = time;
|
||||||
Memory.memory = mem;
|
Memory.memory = mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lastReadReply >= time)
|
||||||
|
break;
|
||||||
|
|
||||||
ueuses.push(ueuseResponse.data[0]);
|
ueuses.push(ueuseResponse.data[0]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -68,14 +70,19 @@ try {
|
|||||||
|
|
||||||
const mem = Memory.memory;
|
const mem = Memory.memory;
|
||||||
const lastReadMention = mem.lastReadMention;
|
const lastReadMention = mem.lastReadMention;
|
||||||
mem.lastReadMention = mentions[0]?.uniqid ?? lastReadMention;
|
|
||||||
Memory.memory = mem;
|
|
||||||
|
|
||||||
for (const mention of mentions) {
|
for (const [index, mention] of mentions.entries()) {
|
||||||
if (lastReadMention === mention.uniqid) {
|
const time = new Date(mention.datetime).getTime();
|
||||||
break;
|
|
||||||
|
if (index === 0) {
|
||||||
|
const mem = Memory.memory;
|
||||||
|
mem.lastReadMention = time;
|
||||||
|
Memory.memory = mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lastReadMention >= time)
|
||||||
|
break;
|
||||||
|
|
||||||
ueuses.push(mention);
|
ueuses.push(mention);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ if (config.earthquake?.useHistoryData) {
|
|||||||
processMessage(message);
|
processMessage(message);
|
||||||
|
|
||||||
if (!config.debug) {
|
if (!config.debug) {
|
||||||
mem.processedInfo.concat([id]);
|
const mem = Memory.memory;
|
||||||
|
mem.processedInfo = mem.processedInfo.concat([id]);
|
||||||
Memory.memory = mem;
|
Memory.memory = mem;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+2
-2
@@ -11,8 +11,8 @@ class MemoryClass {
|
|||||||
writeFileSync(path, JSON.stringify({
|
writeFileSync(path, JSON.stringify({
|
||||||
processedInfo: [],
|
processedInfo: [],
|
||||||
permissions: {},
|
permissions: {},
|
||||||
lastReadMention: "",
|
lastReadMention: 0,
|
||||||
lastReadReply: "",
|
lastReadReply: 0,
|
||||||
userid: "",
|
userid: "",
|
||||||
max_length: 0,
|
max_length: 0,
|
||||||
}));
|
}));
|
||||||
|
|||||||
Reference in New Issue
Block a user