fix team leader timeout

yet another case of user ID case bug
pull/7494/head
Thibault Duplessis 2020-10-22 22:54:06 +02:00
parent 29c9e76295
commit 5f3f288784
1 changed files with 5 additions and 5 deletions

View File

@ -13,18 +13,18 @@ export function moderationCtrl(opts: ModerationOpts): ModerationCtrl {
const open = (line: HTMLElement) => {
const userA = line.querySelector('a.user-link') as HTMLLinkElement;
const text = (line.querySelector('t') as HTMLElement).innerText;
const id = userA.href.split('/')[4];
const username = userA.href.split('/')[4];
if (opts.permissions.timeout) {
loading = true;
userModInfo(id).then(d => {
data = {...d, text};
userModInfo(username).then(d => {
data = { ...d, text };
loading = false;
opts.redraw();
});
} else {
data = {
id,
username: id,
id: username.toLowerCase(),
username,
text
};
}