From 7c1b0f6ec2733ba82a89c1488618ec77d8a16067 Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Mon, 6 Jun 2022 19:04:18 +0000 Subject: URIs: Support group chat uris --- README.md | 1 + index.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 435a2b2..76dce38 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ For the JID romeo@xmpp.example, it will create the following page ([live example ## Supported URIs * [xmpp:romeo@xmpp.example](https://zachdecook.com/chat?romeo@xmpp.example) +* [xmpp:name@muc.example.com?join](https://zachdecook.com/chat?xmpp:name@muc.example.com?join) ## Design decisions diff --git a/index.php b/index.php index b8a2b5b..b7a0024 100644 --- a/index.php +++ b/index.php @@ -20,6 +20,9 @@ } // TODO: Better invitation type detection. $action = $lang->chat; + if ( str_contains($uri, '?join') ) { + $action = $lang->muc; + } $name = ucfirst(explode("@", substr($uri, 5))[0]); function t($template) { GLOBAL $name; -- cgit 1.4.1