aboutsummaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--model/Room.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/model/Room.php b/model/Room.php
index e5163a5..1fdbf7b 100644
--- a/model/Room.php
+++ b/model/Room.php
@@ -154,9 +154,20 @@ class Room
);
}
+ public function hasWebchat() {
+ return $this->getConference()->get('ROOMS.'.$this->getSlug().'.WEBCHAT') && $this->getConference()->has('WEBCHAT_URL');
+ }
+
+ public function getWebchatUrl() {
+ return sprintf(
+ $this->getConference()->get('ROOMS.'.$this->getSlug().'.WEBCHAT_URL', $this->getConference()->get('WEBCHAT_URL')),
+ rawurlencode($this->getSlug())
+ );
+ }
+
public function hasChat() {
- return $this->hasTwitter() || $this->hasIrc();
+ return $this->hasTwitter() || $this->hasIrc() || $this->hasWebchat();
}