Resolve "Allow creation of new direct chat using matrix id"

This commit is contained in:
N Pex 2022-12-12 16:10:53 +00:00 committed by n8fr8
parent 3bd119416c
commit 8d3ad1c27f
16 changed files with 245 additions and 172 deletions

View file

@ -431,6 +431,13 @@ class Util {
return null;
}
sanitizeUserId(userId) {
if (userId && userId.match(/^@.+$/)) {
return userId;
}
return null;
}
getFirstVisibleElement(parentNode) {
const visible = this.findVisibleElements(parentNode);
if (visible && visible.length > 0) {