Remove unused StandardMethods and improve session logic
This commit is contained in:
parent
86435a3d0b
commit
701acfde35
30 changed files with 1032 additions and 704 deletions
|
@ -13,15 +13,6 @@ enum PeerFlags : string
|
|||
// General Flags
|
||||
case VERIFIED = 'VERIFIED';
|
||||
|
||||
// Verification Flags
|
||||
case VER_SET_PASSWORD = 'VER_SET_PASSWORD';
|
||||
case VER_SET_OTP = 'VER_SET_OTP';
|
||||
case VER_SET_DISPLAY_NAME = 'VER_SET_DISPLAY_NAME';
|
||||
case VER_EMAIL = 'VER_EMAIL';
|
||||
case VER_SMS = 'VER_SMS';
|
||||
case VER_PHONE_CALL = 'VER_PHONE_CALL';
|
||||
case VER_SOLVE_IMAGE_CAPTCHA = 'VER_SOLVE_IMAGE_CAPTCHA';
|
||||
|
||||
/**
|
||||
* Converts an array of PeerFlags enums to a string representation
|
||||
*
|
||||
|
@ -48,20 +39,4 @@ enum PeerFlags : string
|
|||
|
||||
return array_map(fn(string $value) => PeerFlags::from(trim($value)), explode(',', $flagString));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the flag is public. Public flags can be seen by other peers.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isPublic(): bool
|
||||
{
|
||||
return match($this)
|
||||
{
|
||||
self::VER_SET_PASSWORD,
|
||||
self::VER_SET_OTP,
|
||||
self::VER_SOLVE_IMAGE_CAPTCHA => false,
|
||||
default => true,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue