mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Platoons social functionality (#91)
### Description This implements and completes #87 (to the best of my knowledge) ### Game Robocraft ### Please confirm - [x] I am the legal owner or represent the owner of all work submitted - [x] I consent to my submission being added to this FOSS project - [ ] This PR used LLMs to generate some or all of the code changes Reviewed-on: https://git.ngram.ca/OpenJam/rc-servers/pulls/91 Co-authored-by: NG (Graham) <ngniusness@gmail.com> Co-committed-by: NG (Graham) <ngniusness@gmail.com>
This commit is contained in:
@@ -458,6 +458,7 @@ pub trait SocialUser: Send + Sync {
|
||||
async fn cancel_friend(&self, username: String) -> Result<bool, polariton_server::operations::SimpleOpError>;
|
||||
async fn remove_friend(&self, username: String) -> Result<bool, polariton_server::operations::SimpleOpError>;
|
||||
async fn list_friends(&self) -> Result<Vec<FriendData>, polariton_server::operations::SimpleOpError>;
|
||||
async fn list_social_info(&self, public_ids: &[String]) -> Result<Vec<SocialInfo>, polariton_server::operations::SimpleOpError>;
|
||||
async fn has_unclaimed_match_rewards(&self) -> Result<bool, polariton_server::operations::SimpleOpError>;
|
||||
async fn get_unclaimed_match_rewards(&self) -> Result<MatchRewards, polariton_server::operations::SimpleOpError>;
|
||||
async fn claim_match_rewards(&self) -> Result<bool, polariton_server::operations::SimpleOpError>;
|
||||
@@ -498,6 +499,13 @@ pub struct FriendData {
|
||||
pub avatar_id: u32,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct SocialInfo {
|
||||
pub public_id: String,
|
||||
pub display_name: String,
|
||||
pub avatar_id: Option<i32>,
|
||||
}
|
||||
|
||||
pub enum FriendInviteStatus {
|
||||
InviteSent,
|
||||
InvitePending,
|
||||
|
||||
Reference in New Issue
Block a user