Version 5.0.13

This commit is contained in:
Neo committed 2025-12-19 19:04:57 -08:00
1 parent b89858b2ff
commit 5efe744c5f
1407 files changed
+69690 -30177

No files matched your search

+10
View File
@@ -16,6 +16,7 @@ use BadMethodCallException;
use DateInterval;
use DomainException;
use Exception;
use IPS\Api\Webhook;
use IPS\Application;
use IPS\Content;
use IPS\DateTime;
@@ -164,6 +165,8 @@ trait Reactable
/* Fire event */
Event::fire( 'onReact', $member, [ $this, $reaction ] );
Webhook::fire( 'content_reaction_added', [ 'member' => $member, 'content' => $this, 'reaction' => $reaction ] );
/* Have we hit highlighted content? */
if( $this->isHighlighted() )
{
@@ -262,6 +265,7 @@ trait Reactable
/* Fire event */
Event::fire( 'onUnreact', $member, [ $this ] );
Webhook::fire( 'content_reaction_removed', [ 'member' => $member, 'content' => $this, 'reaction' => $reaction ] );
/* Remove Notifications */
if( $removeNotifications === TRUE )
@@ -296,6 +300,12 @@ trait Reactable
*/
public function canReact( ?Member $member = NULL ): bool
{
/* Extensions go first */
if( $permCheck = Permissions::can( 'react', $this, $member ) )
{
return ( $permCheck === Permissions::PERM_ALLOW );
}
if( !$this->actionEnabled( 'react', $member ) )
{
return false;