Skip to content

Commit a203fc3

Browse files
committed
feat: RPCs for blocking feature
1 parent e07ccb6 commit a203fc3

File tree

1 file changed

+37
-6
lines changed

1 file changed

+37
-6
lines changed

Diff for: proto/decentraland/social_service/v2/social_service_v2.proto

+37-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ message InternalServerError {}
1010
// Types
1111
message User { string address = 1; }
1212

13-
message FriendProfile {
13+
message Profile {
1414
string address = 1;
1515
string name = 2;
1616
bool has_claimed_name = 3;
@@ -23,7 +23,7 @@ message Pagination {
2323
}
2424

2525
message FriendshipRequestResponse {
26-
FriendProfile friend = 1;
26+
Profile friend = 1;
2727
int64 created_at = 2;
2828
optional string message = 3;
2929
string id = 4;
@@ -77,7 +77,7 @@ message PaginatedResponse {
7777
}
7878

7979
message PaginatedFriendsProfilesResponse {
80-
repeated FriendProfile friends = 1;
80+
repeated Profile friends = 1;
8181
PaginatedResponse pagination_data = 2;
8282
}
8383

@@ -93,7 +93,7 @@ message UpsertFriendshipResponse {
9393
message Accepted {
9494
string id = 1;
9595
int64 created_at = 2;
96-
FriendProfile friend = 3;
96+
Profile friend = 3;
9797
optional string message = 4;
9898
}
9999
oneof response {
@@ -105,7 +105,7 @@ message UpsertFriendshipResponse {
105105

106106
message FriendshipUpdate {
107107
message RequestResponse {
108-
FriendProfile friend = 1;
108+
Profile friend = 1;
109109
int64 created_at = 2;
110110
optional string message = 3;
111111
string id = 4;
@@ -125,7 +125,7 @@ message FriendshipUpdate {
125125
}
126126

127127
message FriendConnectivityUpdate {
128-
FriendProfile friend = 1;
128+
Profile friend = 1;
129129
ConnectivityStatus status = 2;
130130
}
131131

@@ -155,6 +155,31 @@ message GetFriendshipStatusResponse {
155155
}
156156
}
157157

158+
message BlockUserPayload {
159+
User user = 1;
160+
}
161+
162+
message BlockUserResponse {
163+
Profile profile = 1;
164+
}
165+
166+
message UnblockUserPayload {
167+
User user = 1;
168+
}
169+
170+
message UnblockUserResponse {
171+
Profile profile = 1;
172+
}
173+
174+
message GetBlockedUsersPayload {
175+
optional Pagination pagination = 1;
176+
}
177+
178+
message GetBlockedUsersResponse {
179+
repeated Profile profiles = 1;
180+
PaginatedResponse pagination_data = 2;
181+
}
182+
158183
service SocialService {
159184
// Get the list of friends for the authenticated user
160185
rpc GetFriends(GetFriendsPayload) returns (PaginatedFriendsProfilesResponse) {}
@@ -182,4 +207,10 @@ service SocialService {
182207
// Subscribe to connectivity updates of friends: ONLINE, OFFLINE, AWAY
183208
rpc SubscribeToFriendConnectivityUpdates(google.protobuf.Empty)
184209
returns (stream FriendConnectivityUpdate) {}
210+
211+
rpc BlockUser(BlockUserPayload) returns (BlockUserResponse) {}
212+
213+
rpc UnblockUser(UnblockUserPayload) returns (UnblockUserResponse) {}
214+
215+
rpc GetBlockedUsers(GetBlockedUsersPayload) returns (GetBlockedUsersResponse) {}
185216
}

0 commit comments

Comments
 (0)