| @@ -159,8 +159,15 @@ | ||
| 159 | 159 | $user = $this->getUser(true); |
| 160 | 160 | $space = Space::findOrFail($invitation->post_id); |
| 161 | 161 | $space->verifyUserPermisson($user, 'community_moderator'); |
| 162 | 162 | |
| 163 | + // Links have no recipient; resending would mail an empty address and burn a redemption. | |
| 164 | + if (!is_email($invitation->message)) { | |
| 165 | + return $this->sendError([ | |
| 166 | + 'message' => __('Only email invitations can be resent.', 'fluent-community') | |
| 167 | + ]); | |
| 168 | + } | |
| 169 | + | |
| 163 | 170 | if ($invitation->reactions_count > 5) { |
| 164 | 171 | return $this->sendError([ |
| 165 | 172 | 'message' => __('You cannot resend this invitation', 'fluent-community') |
| 166 | 173 | ]); |