mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-24 08:19:25 -05:00
Return user_type in get_user_by_id
This commit is contained in:
parent
8767b63a82
commit
886eceba3e
@ -24,7 +24,7 @@ from twisted.internet import defer
|
|||||||
from twisted.internet.defer import succeed
|
from twisted.internet.defer import succeed
|
||||||
|
|
||||||
from synapse import event_auth
|
from synapse import event_auth
|
||||||
from synapse.api.constants import EventTypes, Membership, RelationTypes
|
from synapse.api.constants import EventTypes, Membership, RelationTypes, UserTypes
|
||||||
from synapse.api.errors import (
|
from synapse.api.errors import (
|
||||||
AuthError,
|
AuthError,
|
||||||
Codes,
|
Codes,
|
||||||
@ -469,6 +469,9 @@ class EventCreationHandler(object):
|
|||||||
|
|
||||||
u = yield self.store.get_user_by_id(user_id)
|
u = yield self.store.get_user_by_id(user_id)
|
||||||
assert u is not None
|
assert u is not None
|
||||||
|
if u["user_type"] == UserTypes.SUPPORT:
|
||||||
|
# support users are not required to consent
|
||||||
|
return
|
||||||
if u["appservice_id"] is not None:
|
if u["appservice_id"] is not None:
|
||||||
# users registered by an appservice are exempt
|
# users registered by an appservice are exempt
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user