Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

hash_util: Handle `me` operand.

Aman Agrawalb07c3368b041
diff --git a/web/src/hash_util.ts b/web/src/hash_util.ts
index 3724c5c1e79..1b1495ce23b 100644
--- a/web/src/hash_util.ts
+++ b/web/src/hash_util.ts
@@ -62,6 +62,10 @@ export function decode_operand(
operator: NarrowCanonicalTerm["operator"],
operand: NarrowCanonicalTerm["operand"],
): string {
+ if (operand === "me" && (operator === "dm" || operator === "sender")) {
+ return people.my_current_email();
+ }
+
if (operator === "dm-including" || operator === "dm" || operator === "sender") {
const emails = people.slug_to_emails(operand);
if (emails) {