Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate/replace remaining inet:web* secondary props (SYN-7399) #4001

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion synapse/models/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def getModelDefs(self):
'doc': 'The WiFi SSID that the credentials allow access to.',
}),
('web:acct', ('inet:web:acct', {}), {
'doc': 'The web account that the credentials allow access to.',
'deprecated': True,
'doc': 'Deprecated. Use :service:account.',
}),
('service:account', ('inet:service:account', {}), {
'doc': 'The service account that the credentials allow access to.'}),
Expand Down
15 changes: 11 additions & 4 deletions synapse/models/person.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,12 @@ def getModelDefs(self):
'doc': 'The service accounts associated with this contact.'}),

('web:acct', ('inet:web:acct', {}), {
'doc': 'The social media account for this contact.',
'deprecated': True,
'doc': 'Deprecated. Use :service:accounts.',
}),
('web:group', ('inet:web:group', {}), {
'doc': 'A web group representing this contact.',
'deprecated': True,
'doc': 'Deprecated. Use inet:service:group:profile to link to a group.',
}),
('birth:place', ('geo:place', {}), {
'doc': 'A fully resolved place of birth for this contact.',
Expand Down Expand Up @@ -463,7 +465,8 @@ def getModelDefs(self):
'doc': 'An array of secondary/associated email addresses.',
}),
('web:accts', ('array', {'type': 'inet:web:acct', 'uniq': True, 'sorted': True}), {
'doc': 'An array of secondary/associated web accounts.',
'deprecated': True,
'doc': 'Deprecated. Use :service:accounts.',
}),
('id:numbers', ('array', {'type': 'ou:id:number', 'uniq': True, 'sorted': True}), {
'doc': 'An array of secondary/associated IDs.',
Expand Down Expand Up @@ -511,7 +514,11 @@ def getModelDefs(self):
'doc': 'The file from which the contact list was extracted.',
}),
('source:acct', ('inet:web:acct', {}), {
'doc': 'The web account from which the contact list was extracted.',
'deprecated': True,
'doc': 'Deprecated. Use :source:account.',
}),
('source:account', ('inet:service:account', {}), {
'doc': 'The service account from which the contact list was extracted.',
}),
)),

Expand Down
3 changes: 2 additions & 1 deletion synapse/models/telco.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@ def getModelDefs(self):
# User related data
('name', ('ps:name', {}), {}),
('email', ('inet:email', {}), {}),
('acct', ('inet:web:acct', {}), {}),
('acct', ('inet:web:acct', {}), {
'deprecated': True}),

('account', ('inet:service:account', {}), {
'doc': 'The service account which is associated with the tracked device.'}),
Expand Down
2 changes: 2 additions & 0 deletions synapse/tests/test_model_person.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,14 @@ async def test_ps_simple(self):
:source:host=*
:source:file=*
:source:acct=(twitter.com, invisig0th)
:source:account=(twitter.com, invisig0th)
]''')
self.len(1, nodes)
self.len(1, await core.nodes('ps:contactlist -> it:host'))
self.len(1, await core.nodes('ps:contactlist -> file:bytes'))
self.len(2, await core.nodes('ps:contactlist -> ps:contact'))
self.len(1, await core.nodes('ps:contactlist -> inet:web:acct'))
self.len(1, await core.nodes('ps:contactlist -> inet:service:account'))

nodes = await core.nodes('''[
ps:workhist = *
Expand Down
Loading