Send deviceId and platform
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* Type converters for Draft API - convert between ComposerState and server Draft types.
|
* Type converters for Draft API - convert between ComposerState and server Draft types.
|
||||||
*/
|
*/
|
||||||
|
import {Platform} from 'react-native'
|
||||||
import {type AppBskyDraftDefs, AtUri, RichText} from '@atproto/api'
|
import {type AppBskyDraftDefs, AtUri, RichText} from '@atproto/api'
|
||||||
import {nanoid} from 'nanoid/non-secure'
|
import {nanoid} from 'nanoid/non-secure'
|
||||||
|
|
||||||
@@ -17,6 +18,7 @@ import {
|
|||||||
type PostDraft,
|
type PostDraft,
|
||||||
} from '#/view/com/composer/state/composer'
|
} from '#/view/com/composer/state/composer'
|
||||||
import {type VideoState} from '#/view/com/composer/state/video'
|
import {type VideoState} from '#/view/com/composer/state/video'
|
||||||
|
import {getDeviceId} from '#/analytics/identifiers'
|
||||||
import {logger} from './logger'
|
import {logger} from './logger'
|
||||||
import {type DraftPostDisplay, type DraftSummary} from './schema'
|
import {type DraftPostDisplay, type DraftSummary} from './schema'
|
||||||
|
|
||||||
@@ -66,6 +68,8 @@ export async function composerStateToDraft(state: ComposerState): Promise<{
|
|||||||
|
|
||||||
const draft: AppBskyDraftDefs.Draft = {
|
const draft: AppBskyDraftDefs.Draft = {
|
||||||
$type: 'app.bsky.draft.defs#draft',
|
$type: 'app.bsky.draft.defs#draft',
|
||||||
|
deviceId: getDeviceId(),
|
||||||
|
platform: Platform.OS,
|
||||||
posts,
|
posts,
|
||||||
threadgateAllow: threadgateAllowUISettingToAllowRecordValue(
|
threadgateAllow: threadgateAllowUISettingToAllowRecordValue(
|
||||||
state.thread.threadgate,
|
state.thread.threadgate,
|
||||||
|
|||||||
Reference in New Issue
Block a user