diff options
author | Ike | 2019-10-25 21:24:31 +0200 |
---|---|---|
committer | Ike | 2019-10-25 21:25:09 +0200 |
commit | dffd7ec9dd715ff084b4e168df5f712fff06bf0d (patch) | |
tree | c4737f2c8c12585e897e88cf0c4467a0659ce1b9 /model | |
parent | 310517fa101910d88e4ee6cfd2fa760f6d9c72ff (diff) |
Implement embedded webchat
Diffstat (limited to '')
-rw-r--r-- | model/Room.php | 13 |
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(); } |