Compare commits
5 Commits
api-groups
...
5bfd21aaa9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5bfd21aaa9 | ||
|
|
b85b54f560 | ||
|
|
eb04433427 | ||
|
|
3c10380162 | ||
| d62adbb5b6 |
@@ -1,9 +1,16 @@
|
||||
using MessagePack;
|
||||
using MessagePack;
|
||||
|
||||
namespace LightlessSync.API.Data;
|
||||
|
||||
[MessagePackObject(keyAsPropertyName: true)]
|
||||
public record UserData(string UID, string? Alias = null, bool IsAdmin = false, bool IsModerator = false)
|
||||
public record UserData(
|
||||
string UID,
|
||||
string? Alias = null,
|
||||
bool IsAdmin = false,
|
||||
bool IsModerator = false,
|
||||
bool HasVanity = false,
|
||||
string? TextColorHex = "",
|
||||
string? TextGlowColorHex = "")
|
||||
{
|
||||
[IgnoreMember]
|
||||
public string AliasOrUID => string.IsNullOrWhiteSpace(Alias) ? UID : Alias;
|
||||
|
||||
@@ -10,6 +10,9 @@ public record ConnectionDto(UserData User)
|
||||
public int ServerVersion { get; set; }
|
||||
public bool IsAdmin { get; set; }
|
||||
public bool IsModerator { get; set; }
|
||||
public bool HasVanity { get; set; }
|
||||
public string? TextColorHex { get; set; }
|
||||
public string? TextGlowColorHex { get; set; }
|
||||
public ServerInfo ServerInfo { get; set; } = new();
|
||||
public DefaultPermissionsDto DefaultPreferredPermissions { get; set; } = new();
|
||||
}
|
||||
|
||||
@@ -8,4 +8,4 @@ namespace LightlessSync.API.Dto.Group;
|
||||
public record GroupPasswordDto(GroupData Group, string Password) : GroupDto(Group);
|
||||
|
||||
[MessagePackObject(keyAsPropertyName: true)]
|
||||
public record GroupJoinDto(GroupData Group, string Password, GroupUserPreferredPermissions GroupUserPreferredPermissions, bool Finder = false) : GroupPasswordDto(Group, Password);
|
||||
public record GroupJoinDto(GroupData Group, string Password, GroupUserPreferredPermissions GroupUserPreferredPermissions) : GroupPasswordDto(Group, Password);
|
||||
6
LightlessSyncAPI/Dto/User/UserVanityColorsDto.cs
Normal file
6
LightlessSyncAPI/Dto/User/UserVanityColorsDto.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using MessagePack;
|
||||
|
||||
namespace LightlessSync.API.Dto.User;
|
||||
|
||||
[MessagePackObject(keyAsPropertyName: true)]
|
||||
public record UserVanityColorsDto(string? TextColorHex, string? TextGlowColorHex);
|
||||
@@ -1,4 +1,4 @@
|
||||
using LightlessSync.API.Data;
|
||||
using LightlessSync.API.Data;
|
||||
using LightlessSync.API.Data.Enum;
|
||||
using LightlessSync.API.Dto;
|
||||
using LightlessSync.API.Dto.CharaData;
|
||||
@@ -50,6 +50,7 @@ public interface ILightlessHub
|
||||
Task GroupChangeOwnership(GroupPairDto groupPair);
|
||||
Task<bool> GroupChangePassword(GroupPasswordDto groupPassword);
|
||||
Task GroupClear(GroupDto group);
|
||||
Task GroupClearFinder(GroupDto group);
|
||||
Task<GroupJoinDto> GroupCreate();
|
||||
Task<List<string>> GroupCreateTempInvite(GroupDto group, int amount);
|
||||
Task GroupDelete(GroupDto group);
|
||||
@@ -81,6 +82,7 @@ public interface ILightlessHub
|
||||
Task<List<UserFullPairDto>> UserGetPairedClients();
|
||||
Task<UserProfileDto> UserGetProfile(UserDto dto);
|
||||
Task UserPushData(UserCharaDataMessageDto dto);
|
||||
Task UserUpdateVanityColors(UserVanityColorsDto dto);
|
||||
Task UserRemovePair(UserDto userDto);
|
||||
Task UserSetProfile(UserProfileDto userDescription);
|
||||
Task UserUpdateDefaultPermissions(DefaultPermissionsDto defaultPermissionsDto);
|
||||
|
||||
Reference in New Issue
Block a user