Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
teraßyte Posted July 9, 2022 Posted July 9, 2022 In the mentioned function \applications\core\sources\Messenger\Conversation::memberCanReceiveNewMe() you added a new $type parameter but it's not checked anywhere in the function itself? /** * Check if a member can receive new messages * * @param \IPS\Member $member The member to check * @param \IPS\Member $sender The member sending the new message * @param string $type Type of message to check (new, reply) * @return bool */ public static function memberCanReceiveNewMessage( \IPS\Member $member, \IPS\Member $sender, $type='new' ) { /* Messenger is hard disabled */ if ( $member->members_disable_pm == 2 ) { return FALSE; } else if ( $member->members_disable_pm == 1 ) { /* We will allow moderators */ return $sender->modPermissions() !== FALSE; } /* Group can not use messenger */ if ( !$member->canAccessModule( \IPS\Application\Module::get( 'core', 'messaging' ) ) ) { return FALSE; } /* Inbox is full */ if ( ( $member->group['g_max_messages'] > 0 AND $member->msg_count_total >= $member->group['g_max_messages'] ) and !$sender->group['gbw_pm_override_inbox_full'] ) { return FALSE; } /* Is being ignored */ if ( $member->isIgnoring( $sender, 'messages' ) ) { return FALSE; } return TRUE; }
Solution Daniel F Posted July 11, 2022 Solution Posted July 11, 2022 Removing it now would break BC 😄 SeNioR- 1
Recommended Posts