mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-11 09:40:28 +03:00
add Liberapay: field with username as data
Liberapay was originally included using a numeric ID, since they had not yet finalized the public URLs. Now it is a username. So this logic prefers the username in Liberapay: field, and keeps the old LiberapayID: to ease migration. LiberapayID: will not override Liberapay:. Clients are expected to prefer Liberapay: over LiberapayID:
This commit is contained in:
parent
0183592526
commit
62c8fd5999
13 changed files with 28 additions and 4 deletions
|
|
@ -77,6 +77,7 @@ app_fields = set([
|
|||
'Changelog',
|
||||
'Donate',
|
||||
'FlattrID',
|
||||
'Liberapay',
|
||||
'LiberapayID',
|
||||
'OpenCollective',
|
||||
'Bitcoin',
|
||||
|
|
@ -121,6 +122,7 @@ yaml_app_field_order = [
|
|||
'Changelog',
|
||||
'Donate',
|
||||
'FlattrID',
|
||||
'Liberapay',
|
||||
'LiberapayID',
|
||||
'OpenCollective',
|
||||
'Bitcoin',
|
||||
|
|
@ -181,6 +183,7 @@ class App(dict):
|
|||
self.Changelog = ''
|
||||
self.Donate = None
|
||||
self.FlattrID = None
|
||||
self.Liberapay = None
|
||||
self.LiberapayID = None
|
||||
self.OpenCollective = None
|
||||
self.Bitcoin = None
|
||||
|
|
@ -454,6 +457,10 @@ valuetypes = {
|
|||
r'^[0-9a-z]+$',
|
||||
['FlattrID']),
|
||||
|
||||
FieldValidator("Liberapay",
|
||||
VALID_USERNAME_REGEX,
|
||||
['Liberapay']),
|
||||
|
||||
FieldValidator("Liberapay ID",
|
||||
r'^[0-9]+$',
|
||||
['LiberapayID']),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue