mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-05 10:58:23 +00:00
Merge pull request #449 from greenart7c3/claude/upbeat-dirac-pt66Y
Add auto-accept PING permission for applications
This commit is contained in:
@@ -381,6 +381,20 @@ object BunkerRequestUtils {
|
||||
),
|
||||
)
|
||||
}
|
||||
if (!application.permissions.any { it.type == SignerType.PING.toString() }) {
|
||||
application.permissions.add(
|
||||
ApplicationPermissionsEntity(
|
||||
null,
|
||||
key,
|
||||
SignerType.PING.toString(),
|
||||
null,
|
||||
true,
|
||||
RememberType.ALWAYS.screenCode,
|
||||
Long.MAX_VALUE / 1000,
|
||||
0,
|
||||
),
|
||||
)
|
||||
}
|
||||
// check if application has any relay not in saved relays
|
||||
val savedRelays = Amber.instance.getSavedRelays(account)
|
||||
if (relays.any { !savedRelays.contains(it) }) {
|
||||
|
||||
Reference in New Issue
Block a user