2026.4.0-beta.0 #12
@@ -22,19 +22,17 @@ try {
|
||||
});
|
||||
|
||||
if (response.success) {
|
||||
for (const [index, notification] of response.data.entries()) {
|
||||
if (notification.category !== "reply")
|
||||
continue;
|
||||
|
||||
if (!notification.valueid) {
|
||||
console.warn("返信通知にvalueidが存在しないため、スキップします");
|
||||
continue;
|
||||
}
|
||||
const notifications = response.data.filter(notification => notification.category === "reply" && typeof notification.valueid === "string");
|
||||
|
||||
const mem = Memory.memory;
|
||||
if (mem.lastReadReply === notification.valueid) {
|
||||
const lastReadReply = mem.lastReadReply;
|
||||
|
||||
for (const [index, notification] of notifications.entries()) {
|
||||
if (notification.category !== "reply" || typeof notification.valueid !== "string")
|
||||
continue;
|
||||
|
||||
if (lastReadReply === notification.valueid)
|
||||
break;
|
||||
}
|
||||
|
||||
const ueuseResponse = await client.request("ueuse/get", {
|
||||
uniqid: notification.valueid,
|
||||
@@ -48,6 +46,7 @@ try {
|
||||
if (index === 0) {
|
||||
const mem = Memory.memory;
|
||||
mem.lastReadReply = ueuseResponse.data[0].uniqid;
|
||||
Memory.memory = mem;
|
||||
}
|
||||
|
||||
ueuses.push(ueuseResponse.data[0]);
|
||||
@@ -64,15 +63,16 @@ try {
|
||||
});
|
||||
|
||||
if (response.success) {
|
||||
for (const [index, mention] of response.data.entries()) {
|
||||
const mem = Memory.memory;
|
||||
if (mem.lastReadMention === mention.uniqid) {
|
||||
break;
|
||||
}
|
||||
const mentions = response.data;
|
||||
|
||||
if (index === 0) {
|
||||
const mem = Memory.memory;
|
||||
mem.lastReadMention = mention.uniqid;
|
||||
const lastReadMention = mem.lastReadMention;
|
||||
mem.lastReadMention = mentions[0]?.uniqid ?? lastReadMention;
|
||||
Memory.memory = mem;
|
||||
|
||||
for (const mention of mentions) {
|
||||
if (lastReadMention === mention.uniqid) {
|
||||
break;
|
||||
}
|
||||
|
||||
ueuses.push(mention);
|
||||
|
||||
@@ -325,9 +325,10 @@ export default async function miqCommand(ueuse: ueuseModule, args: string[]) {
|
||||
|
||||
if (!response.success) {
|
||||
console.log("返信に失敗:", response.error_code);
|
||||
return;
|
||||
}
|
||||
|
||||
console.warn("ソースのユーズと/miq allowのユーザーが一致しない:", );
|
||||
console.warn("ソースのユーズと/miq allowのユーザーが一致しない:", response.uniqid);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user