Don't use permissionSet to transfer
This commit is contained in:
@@ -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 Location, 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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user