experimental emoji support
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
|
||||
class React extends \Zotlabs\Web\Controller {
|
||||
|
||||
function get() {
|
||||
if(! local_channel())
|
||||
return;
|
||||
|
||||
$postid = $_REQUEST['postid'];
|
||||
|
||||
if(! $postid)
|
||||
return;
|
||||
|
||||
$emoji = $_REQUEST['emoji'];
|
||||
if($_REQUEST['emoji']) {
|
||||
|
||||
$i = q("select * from item where id = %d and uid = %d",
|
||||
intval($postid),
|
||||
intval(local_channel())
|
||||
);
|
||||
|
||||
if(! $i)
|
||||
return;
|
||||
|
||||
$channel = \App::get_channel();
|
||||
|
||||
$n = array();
|
||||
$n['aid'] = $channel['channel_account_id'];
|
||||
$n['uid'] = $channel['channel_id'];
|
||||
$n['parent'] = $postid;
|
||||
$n['parent_mid'] = $i[0]['mid'];
|
||||
$n['mid'] = item_message_id();
|
||||
$n['verb'] = ACTIVITY_REACT . '#' . $emoji;
|
||||
$n['body'] = "\n\n[zmg]" . z_root() . '/images/emoji/' . $emoji . '.png[/zmg]' . "\n\n";
|
||||
$n['author_xchan'] = $channel['channel_hash'];
|
||||
|
||||
$x = item_store($n);
|
||||
if($x['success']) {
|
||||
$nid = $x['item_id'];
|
||||
\Zotlabs\Daemon\Master::Summon(array('Notifier','like',$nid));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 419 B |
|
After Width: | Height: | Size: 863 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 979 B |
|
After Width: | Height: | Size: 814 B |
|
After Width: | Height: | Size: 815 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 839 B |
|
After Width: | Height: | Size: 842 B |
|
After Width: | Height: | Size: 699 B |
|
After Width: | Height: | Size: 675 B |
|
After Width: | Height: | Size: 702 B |
|
After Width: | Height: | Size: 540 B |
|
After Width: | Height: | Size: 893 B |
|
After Width: | Height: | Size: 435 B |
|
After Width: | Height: | Size: 390 B |
|
After Width: | Height: | Size: 935 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 812 B |
|
After Width: | Height: | Size: 896 B |
|
After Width: | Height: | Size: 785 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 824 B |
|
After Width: | Height: | Size: 775 B |
|
After Width: | Height: | Size: 648 B |
|
After Width: | Height: | Size: 888 B |
|
After Width: | Height: | Size: 752 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 867 B |
|
After Width: | Height: | Size: 757 B |
|
After Width: | Height: | Size: 715 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1002 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 694 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 575 B |
|
After Width: | Height: | Size: 634 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 555 B |
|
After Width: | Height: | Size: 894 B |
|
After Width: | Height: | Size: 894 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 933 B |
|
After Width: | Height: | Size: 636 B |
|
After Width: | Height: | Size: 449 B |
|
After Width: | Height: | Size: 413 B |
|
After Width: | Height: | Size: 1009 B |
|
After Width: | Height: | Size: 438 B |
|
After Width: | Height: | Size: 298 B |
|
After Width: | Height: | Size: 449 B |
@@ -0,0 +1,2 @@
|
||||
These files supplied by emojione. License is CC BY 4.0. Attribution is required for commercial use.
|
||||
See http://emojione.com
|
||||