Skip to content

Commit 9d15418

Browse files
committed
feat: rewritten session events
1 parent 643688b commit 9d15418

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

proto/session.proto

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,44 @@ message WorkspacesOwnedList {
4949
message InviteRequest {
5050
// The user the invitation is for.
5151
required string user = 1;
52-
// the workspace the invitation is for
52+
// The workspace the invitation is for.
5353
required common.Identifier workspace = 2;
5454
}
5555

5656
// A message representing a session event.
5757
message SessionEvent {
58-
// Event that occurs when you get invited to a workspace
58+
// Event that occurs when you get invited to a workspace.
5959
message InvitationEvent {
6060
// The user that invited you.
6161
required common.User user = 1;
62+
// The workspace the invitation is for.
63+
required common.WorkspaceInfo workspace = 2;
6264
}
63-
// Event that occurs when a user leaves a workspace.
64-
message LeaveEvent {
65-
// The user that left.
65+
// Event that occurs when a user quits a workspace.
66+
message QuitEvent {
67+
// The user that quits.
6668
required common.User user = 1;
69+
// The workspace the user quit.
70+
required common.WorkspaceInfo workspace = 2;
6771
}
68-
// Event that occurs when an user joins in a workspace you are in
69-
message JoinEvent {
70-
// The user that joined.
72+
// Event that occurs when an user accepts an invite to a workspace you are in.
73+
message AcceptEvent {
74+
// The user that accepted the invite.
7175
required common.User user = 1;
76+
// The workspace the user accepted the invite for.
77+
required common.WorkspaceInfo workspace = 2;
78+
}
79+
// Event that occurs when an user rejects an invite.
80+
message RejectEvent {
81+
// The user that rejected the invite.
82+
required common.User user = 1;
83+
// The workspace the invitation was for.
84+
required common.WorkspaceInfo workspace = 2;
7285
}
7386
oneof event {
7487
InvitationEvent invite = 1;
75-
LeaveEvent leave = 2;
76-
JoinEvent join = 3;
88+
QuitEvent leave = 2;
89+
AcceptEvent join = 3;
90+
RejectEvent reject = 4;
7791
}
7892
}

0 commit comments

Comments
 (0)