aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/ThreadItem.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-06-03 18:13:21 -0700
committerredmatrix <git@macgirvin.com>2016-06-03 18:13:21 -0700
commita7e5e3d5740e499fdf44874d9d361cf344dfd290 (patch)
tree3c089ef30538e72ad4b1f5efde0c718a19a5640d /Zotlabs/Lib/ThreadItem.php
parente81ac9e0637c4533aeb144511b8f68ec8a99e257 (diff)
downloadvolse-hubzilla-a7e5e3d5740e499fdf44874d9d361cf344dfd290.tar.gz
volse-hubzilla-a7e5e3d5740e499fdf44874d9d361cf344dfd290.tar.bz2
volse-hubzilla-a7e5e3d5740e499fdf44874d9d361cf344dfd290.zip
allow any (current) emoji to be displayed on any site, and provide a default list of reactions that can be over-ridden via configuration if a site doesn't like our choices or perhaps the ordering of our choices.
Diffstat (limited to 'Zotlabs/Lib/ThreadItem.php')
-rw-r--r--Zotlabs/Lib/ThreadItem.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index 65f00b867..e55931f40 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -14,6 +14,8 @@ class ThreadItem {
private $template = 'conv_item.tpl';
private $comment_box_template = 'comment_item.tpl';
private $commentable = false;
+ // list of supported reaction emojis - a site can over-ride this via config system.reactions
+ private $reactions = ['1f60a','1f44f','1f37e','1f48b','1f61e','2665','1f622','1f62e','1f634','1f61c','1f607','1f608'];
private $toplevel = false;
private $children = array();
private $parent = null;
@@ -50,6 +52,14 @@ class ThreadItem {
$this->add_child($child);
}
}
+
+ // allow a site to configure the order and content of the reaction emoji list
+ if($this->toplevel) {
+ $x = get_config('system','reactions');
+ if($x && is_array($x) && count($x)) {
+ $this->reactions = $x;
+ }
+ }
}
/**
@@ -345,7 +355,7 @@ class ThreadItem {
'photo' => $body['photo'],
'event' => $body['event'],
'has_tags' => $has_tags,
-
+ 'reactions' => $this->reactions,
// Item toolbar buttons
'emojis' => (($this->is_toplevel() && $this->is_commentable() && feature_enabled($conv->get_profile_owner(),'emojis')) ? '1' : ''),
'like' => $like,