Streaks: do a clientside update for people without the plugin

This commit is contained in:
thororen1234 2026-05-10 20:48:29 -04:00
parent 424c91d438
commit 3a4552843e
No known key found for this signature in database

View file

@ -103,8 +103,14 @@ export default definePlugin({
}
} else if (message.author.id === recipientId) {
if (!theirFlag) {
setTimeout(() => {
useStreaksStore.getState().refresh(recipientId);
setTimeout(async () => {
const before = useStreaksStore.getState().streaks[recipientId]?.count;
await useStreaksStore.getState().refresh(recipientId);
const after = useStreaksStore.getState().streaks[recipientId]?.count;
if (before === after) {
useStreaksStore.getState().update(recipientId);
}
}, 1000);
}
}