mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-31 01:42:27 +00:00
[ui] Fix DM tab blank shell and harden profile modal tests
This commit is contained in:
1 parent
ee8569a99b
commit
0af7de6c07
11 files changed
+356
-48
No files matched your search
@@ -10,6 +10,34 @@ export class ProfileDirectMessageHelper {
|
||||
this.controller = controller;
|
||||
}
|
||||
|
||||
updateDmPrivacyToggleForRecipient(...args) {
|
||||
if (typeof this.mainController.updateDmPrivacyToggleForRecipient === "function") {
|
||||
return this.mainController.updateDmPrivacyToggleForRecipient(...args);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
resolveDirectMessageScheme(message) {
|
||||
if (typeof this.mainController.resolveDirectMessageScheme === "function") {
|
||||
return this.mainController.resolveDirectMessageScheme(message);
|
||||
}
|
||||
|
||||
if (!message || typeof message !== "object") {
|
||||
return "";
|
||||
}
|
||||
|
||||
const scheme =
|
||||
typeof message.scheme === "string"
|
||||
? message.scheme
|
||||
: typeof message.encryption_scheme === "string"
|
||||
? message.encryption_scheme
|
||||
: typeof message?.decryptor?.scheme === "string"
|
||||
? message.decryptor.scheme
|
||||
: "";
|
||||
|
||||
return typeof scheme === "string" ? scheme.trim().toLowerCase() : "";
|
||||
}
|
||||
|
||||
resolveActiveDmActor() {
|
||||
const active = this.mainController.normalizeHexPubkey(this.mainController.getActivePubkey());
|
||||
if (active) {
|
||||
|
||||
Reference in new issue
Block a user