mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:16:07 -04:00
Replace hs.parse_userid with UserID.from_string
This commit is contained in:
parent
7dfd99f163
commit
5759bec43c
31 changed files with 145 additions and 133 deletions
|
@ -20,6 +20,7 @@ from twisted.internet import defer
|
|||
|
||||
import synapse.rest.client.v1.room
|
||||
from synapse.server import HomeServer
|
||||
from synapse.types import UserID
|
||||
|
||||
from ....utils import MockHttpResource, MockClock, SQLiteMemoryDbPool, MockKey
|
||||
from .utils import RestTestCase
|
||||
|
@ -69,7 +70,7 @@ class RoomTypingTestCase(RestTestCase):
|
|||
|
||||
def _get_user_by_token(token=None):
|
||||
return {
|
||||
"user": hs.parse_userid(self.auth_user_id),
|
||||
"user": UserID.from_string(self.auth_user_id),
|
||||
"admin": False,
|
||||
"device_id": None,
|
||||
}
|
||||
|
@ -82,7 +83,7 @@ class RoomTypingTestCase(RestTestCase):
|
|||
|
||||
def get_room_members(room_id):
|
||||
if room_id == self.room_id:
|
||||
return defer.succeed([hs.parse_userid(self.user_id)])
|
||||
return defer.succeed([UserID.from_string(self.user_id)])
|
||||
else:
|
||||
return defer.succeed([])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue