Skip to content

chore: Release v1.1.0 - #20

Merged
nfebe merged 2 commits into
mainfrom
dev
Jun 13, 2026
Merged

nfebe merged 2 commits into
mainfrom
dev

Conversation

@nfebe

@nfebe nfebe commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

[1.1.0] - 2026-06-13

Added

  • Invitation accept and decline API endpoints, so an invited user can join (or turn down) a workspace through the same path that issues the invite
  • MemberInvited and MemberJoined events are now dispatched (on invite and on accept), letting host apps react -- for example to send an invitation email

nfebe added 2 commits June 13, 2026 19:37
Invited users can now accept or decline a workspace invitation through
the API, completing the invitation lifecycle that previously supported
only creating and cancelling invites.

The invite and join moments now emit events, so a host application can
react to them, for example to deliver the invitation email.
@sourceant

sourceant Bot commented Jun 13, 2026

Copy link
Copy Markdown

Code Review Summary

This PR updates the workspace management package to version 1.1.0. It introduces essential features for handling workspace invitations (accept/decline) and implements an event-driven system to allow host applications to respond to membership changes.

🚀 Key Improvements

  • Added API endpoints for accepting and declining invitations.
  • Dispatched MemberInvited and MemberJoined events.
  • Significantly expanded README documentation for API endpoints and events.
  • Comprehensive test coverage for the new invitation flows.

💡 Minor Suggestions

  • Consider case-insensitive email comparison.
  • Refactor shared invitation validation logic in WorkspaceController.

@sourceant sourceant Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review complete. See the overview comment for a summary.

return response()->json(['error' => 'Unauthorized'], 401);
}

$invitation = WorkspaceInvitation::where('token', $token)->firstOrFail();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using firstOrFail() with a non-ID lookup in an API context is generally fine, but consider whether you want to expose a 404 for an invalid token or a more specific 422 if the token simply doesn't exist. For tokens, 404 is appropriate, but ensure you have a custom exception handler if you want to return a JSON error message instead of the default HTML 404 page.

Suggested change
$invitation = WorkspaceInvitation::where('token', $token)->firstOrFail();
$invitation = WorkspaceInvitation::where('token', $token)->first();
if (! $invitation) {
return response()->json(['error' => 'Invalid or expired invitation token'], 404);
}

@nfebe
nfebe merged commit bffd3c3 into main Jun 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant