Compare commits
2 Commits
f1817c5974
...
852e2a005f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
852e2a005f | ||
|
|
03243c93c6 |
@@ -9,5 +9,4 @@ public enum UserPermissions
|
|||||||
DisableSounds = 4,
|
DisableSounds = 4,
|
||||||
DisableVFX = 8,
|
DisableVFX = 8,
|
||||||
Sticky = 16,
|
Sticky = 16,
|
||||||
ShareLocation = 32,
|
|
||||||
}
|
}
|
||||||
@@ -28,10 +28,6 @@ public static class UserPermissionsExtensions
|
|||||||
{
|
{
|
||||||
return perm.HasFlag(UserPermissions.Sticky);
|
return perm.HasFlag(UserPermissions.Sticky);
|
||||||
}
|
}
|
||||||
public static bool IsSharingLocation(this UserPermissions perm)
|
|
||||||
{
|
|
||||||
return perm.HasFlag(UserPermissions.ShareLocation);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void SetDisableAnimations(this ref UserPermissions perm, bool set)
|
public static void SetDisableAnimations(this ref UserPermissions perm, bool set)
|
||||||
{
|
{
|
||||||
@@ -62,10 +58,4 @@ public static class UserPermissionsExtensions
|
|||||||
if (sticky) perm |= UserPermissions.Sticky;
|
if (sticky) perm |= UserPermissions.Sticky;
|
||||||
else perm &= ~UserPermissions.Sticky;
|
else perm &= ~UserPermissions.Sticky;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetShareLocation(this ref UserPermissions perm, bool? set)
|
|
||||||
{
|
|
||||||
if (set == true) perm |= UserPermissions.ShareLocation;
|
|
||||||
else perm &= ~UserPermissions.ShareLocation;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -9,4 +9,7 @@ namespace LightlessSync.API.Dto.User;
|
|||||||
public record LocationDto(UserData User, LocationInfo Location);
|
public record LocationDto(UserData User, LocationInfo Location);
|
||||||
|
|
||||||
[MessagePackObject(keyAsPropertyName: true)]
|
[MessagePackObject(keyAsPropertyName: true)]
|
||||||
public record LocationWithTimeDto(LocationDto Location, DateTimeOffset ExpireAt);
|
public record LocationWithTimeDto(LocationDto LocationDto, DateTimeOffset ExpireAt);
|
||||||
|
|
||||||
|
[MessagePackObject(keyAsPropertyName: true)]
|
||||||
|
public record SharingStatusDto(UserData User, DateTimeOffset ExpireAt);
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ public interface ILightlessHub
|
|||||||
Task SetChatParticipantMute(ChatParticipantMuteRequestDto request);
|
Task SetChatParticipantMute(ChatParticipantMuteRequestDto request);
|
||||||
|
|
||||||
Task UpdateLocation(LocationDto locationDto, bool offline);
|
Task UpdateLocation(LocationDto locationDto, bool offline);
|
||||||
Task<List<LocationWithTimeDto>> RequestAllLocationInfo();
|
Task<(List<LocationWithTimeDto>, List<SharingStatusDto>)> RequestAllLocationInfo();
|
||||||
Task ToggleLocationSharing(LocationSharingToggleDto dto);
|
Task ToggleLocationSharing(LocationSharingToggleDto dto);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,5 +58,5 @@ public interface ILightlessHubClient : ILightlessHub
|
|||||||
void OnGposeLobbyPushCharacterData(Action<CharaDataDownloadDto> act);
|
void OnGposeLobbyPushCharacterData(Action<CharaDataDownloadDto> act);
|
||||||
void OnGposeLobbyPushPoseData(Action<UserData, PoseData> act);
|
void OnGposeLobbyPushPoseData(Action<UserData, PoseData> act);
|
||||||
void OnGposeLobbyPushWorldData(Action<UserData, WorldData> act);
|
void OnGposeLobbyPushWorldData(Action<UserData, WorldData> act);
|
||||||
void OnReciveLocation(Action<LocationDto> act);
|
void OnReceiveLocation(Action<LocationDto, DateTimeOffset> act);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user