aboutsummaryrefslogtreecommitdiffstats
path: root/include/widgets.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-04-03 16:41:40 -0700
committerredmatrix <git@macgirvin.com>2016-04-03 16:41:40 -0700
commitbf3f3564e08754c3f91524798523839ae7b9094c (patch)
treef1da047c364df5de64eb9467663787d2e5c6c0b3 /include/widgets.php
parent102d41ccb96f67363d50941f5ce4ca9bfd2ae6d5 (diff)
downloadvolse-hubzilla-bf3f3564e08754c3f91524798523839ae7b9094c.tar.gz
volse-hubzilla-bf3f3564e08754c3f91524798523839ae7b9094c.tar.bz2
volse-hubzilla-bf3f3564e08754c3f91524798523839ae7b9094c.zip
issue #138 ; make ajaxchat optional and configurable. For reasons we've discussed repeatedly the ajax chat will not be removed from core as XMPP chat does not provide decentralised access control compatible with nomadic identity.
Diffstat (limited to 'include/widgets.php')
-rw-r--r--include/widgets.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/widgets.php b/include/widgets.php
index 0116e5bd1..0355ebd8c 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -785,6 +785,7 @@ function widget_menu_preview($arr) {
function widget_chatroom_list($arr) {
+
require_once("include/chat.php");
$r = chatroom_list(App::$profile['profile_uid']);
@@ -808,6 +809,10 @@ function widget_chatroom_members() {
}
function widget_bookmarkedchats($arr) {
+
+ if(! feature_enabled(App::$profile['profile_uid'],'ajaxchat'))
+ return '';
+
$h = get_observer_hash();
if(! $h)
return;
@@ -827,6 +832,9 @@ function widget_bookmarkedchats($arr) {
function widget_suggestedchats($arr) {
+ if(! feature_enabled(App::$profile['profile_uid'],'ajaxchat'))
+ return '';
+
// probably should restrict this to your friends, but then the widget will only work
// if you are logged in locally.