Minor cleanups

This commit is contained in:
Andrew Ferrazzutti 2022-03-11 20:38:55 -05:00
parent c48952a9fa
commit f5d16839a6
2 changed files with 3 additions and 4 deletions

View File

@ -50,7 +50,6 @@ from ..types.request import (
CommandResultDoneValue CommandResultDoneValue
) )
from .types import ChannelInfoUnion
from .types import PortalChannelInfo from .types import PortalChannelInfo
from .errors import InvalidAccessToken from .errors import InvalidAccessToken
@ -105,7 +104,7 @@ class Client:
@classmethod @classmethod
async def register_device(cls, passcode: str, **req) -> None: async def register_device(cls, passcode: str, **req) -> None:
"""Register a (fake) device that will be associated with the provided login credentials.""" """Register a (fake) device that will be associated with the provided login credentials."""
await cls._api_request_void("register_device", passcode=passcode, **req) await cls._api_request_void("register_device", passcode=passcode, is_secret=True, **req)
@classmethod @classmethod
async def login(cls, **req) -> OAuthCredential: async def login(cls, **req) -> OAuthCredential:

View File

@ -62,7 +62,7 @@ class UserClient {
this.#initializing = true this.#initializing = true
const userClient = new UserClient(mxid, credential) const userClient = new UserClient(mxid, credential)
userClient.#serviceClient = await ServiceApiClient.create(this.credential) userClient.#serviceClient = await ServiceApiClient.create(credential)
return userClient return userClient
} }
@ -478,7 +478,7 @@ export default class PeerClient {
} else { } else {
resp.command = "error" resp.command = "error"
resp.error = err.toString() resp.error = err.toString()
this.log(`Error handling request ${resp.id} ${err}`) this.log(`Error handling request ${resp.id} ${err.stack}`)
} }
} }
await this.#write(resp) await this.#write(resp)