mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Support max_toot_chars
See this commit of how to supply this value in API response. `instance_serializer.rb`
2bf275ba3b
This commit is contained in:
@ -149,7 +149,7 @@ const ComponentInstance: React.FC<Props> = ({
|
||||
<InstanceAuth
|
||||
key={Math.random()}
|
||||
instanceDomain={instanceDomain}
|
||||
instanceUri={instanceQuery.data.uri}
|
||||
instance={instanceQuery.data}
|
||||
appData={{
|
||||
clientId: appsQuery.data.client_id,
|
||||
clientSecret: appsQuery.data.client_secret
|
||||
|
@ -8,13 +8,13 @@ import { useDispatch } from 'react-redux'
|
||||
export interface Props {
|
||||
instanceDomain: string
|
||||
// Domain can be different than uri
|
||||
instanceUri: Mastodon.Instance['uri']
|
||||
instance: Mastodon.Instance
|
||||
appData: InstanceLocal['appData']
|
||||
goBack?: boolean
|
||||
}
|
||||
|
||||
const InstanceAuth = React.memo(
|
||||
({ instanceDomain, instanceUri, appData, goBack }: Props) => {
|
||||
({ instanceDomain, instance, appData, goBack }: Props) => {
|
||||
const redirectUri = AuthSession.makeRedirectUri({
|
||||
native: 'tooot://instance-auth',
|
||||
useProxy: false
|
||||
@ -65,7 +65,8 @@ const InstanceAuth = React.memo(
|
||||
localAddInstance({
|
||||
url: instanceDomain,
|
||||
token: accessToken,
|
||||
uri: instanceUri,
|
||||
uri: instance.uri,
|
||||
max_toot_chars: instance.max_toot_chars,
|
||||
appData
|
||||
})
|
||||
)
|
||||
|
Reference in New Issue
Block a user