1
0
mirror of https://github.com/chylex/Discord-History-Tracker.git synced 2024-11-25 05:42:45 +01:00

Compare commits

..

2 Commits

Author SHA1 Message Date
653d28136c
Fix broken links to image embeds in viewer 2024-04-21 18:48:20 +02:00
fdec0dc510
Stream messages to viewer using JSON lines 2024-04-21 18:48:19 +02:00
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import discord from "./discord.mjs";
// ------------------------ // ------------------------
const filter = { const filter = {
byUser: ((user) => message => message.u === user), byUser: ((userindex) => message => message.u === userindex),
byTime: ((timeStart, timeEnd) => message => message.t >= timeStart && message.t <= timeEnd), byTime: ((timeStart, timeEnd) => message => message.t >= timeStart && message.t <= timeEnd),
byContents: ((substr) => message => ("m" in message ? message.m : "").indexOf(substr) !== -1), byContents: ((substr) => message => ("m" in message ? message.m : "").indexOf(substr) !== -1),
byRegex: ((regex) => message => regex.test("m" in message ? message.m : "")), byRegex: ((regex) => message => regex.test("m" in message ? message.m : "")),

View File

@ -411,7 +411,7 @@ export default (function() {
setActiveFilter(filter) { setActiveFilter(filter) {
switch (filter ? filter.type : "") { switch (filter ? filter.type : "") {
case "user": case "user":
filterFunction = processor.FILTER.byUser(filter.value); filterFunction = processor.FILTER.byUser(loadedFileMeta.userindex.indexOf(filter.value));
break; break;
case "contents": case "contents":