Compare commits
2 Commits
f1817c5974
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ecd5375e6 | |||
| a802f242b0 |
@@ -9,5 +9,4 @@ public enum UserPermissions
|
||||
DisableSounds = 4,
|
||||
DisableVFX = 8,
|
||||
Sticky = 16,
|
||||
ShareLocation = 32,
|
||||
}
|
||||
@@ -28,10 +28,6 @@ public static class UserPermissionsExtensions
|
||||
{
|
||||
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)
|
||||
{
|
||||
@@ -62,10 +58,4 @@ public static class UserPermissionsExtensions
|
||||
if (sticky) 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);
|
||||
|
||||
[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 UpdateLocation(LocationDto locationDto, bool offline);
|
||||
Task<List<LocationWithTimeDto>> RequestAllLocationInfo();
|
||||
Task ToggleLocationSharing(LocationSharingToggleDto dto);
|
||||
Task<(List<LocationWithTimeDto>, List<SharingStatusDto>)> RequestAllLocationInfo();
|
||||
Task<bool> ToggleLocationSharing(LocationSharingToggleDto dto);
|
||||
|
||||
}
|
||||
|
||||
@@ -58,5 +58,5 @@ public interface ILightlessHubClient : ILightlessHub
|
||||
void OnGposeLobbyPushCharacterData(Action<CharaDataDownloadDto> act);
|
||||
void OnGposeLobbyPushPoseData(Action<UserData, PoseData> 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