@@ -1,6 +1,6 @@
|
||||
import { proto } from '../../WAProto/index.js'
|
||||
import { makeLibSignalRepository } from '../Signal/libsignal'
|
||||
import type { AuthenticationState, MediaType, SocketConfig, WAVersion } from '../Types'
|
||||
import type { AuthenticationState, SocketConfig, WAVersion } from '../Types'
|
||||
import { Browsers } from '../Utils'
|
||||
import logger from '../Utils/logger'
|
||||
import defaultVersion from './baileys-version.json' with { type: 'json' }
|
||||
@@ -105,6 +105,8 @@ export const MEDIA_HKDF_KEY_MAPPING = {
|
||||
'biz-cover-photo': 'Image'
|
||||
}
|
||||
|
||||
export type MediaType = keyof typeof MEDIA_HKDF_KEY_MAPPING
|
||||
|
||||
export const MEDIA_KEYS = Object.keys(MEDIA_PATH_MAP) as MediaType[]
|
||||
|
||||
export const MIN_PREKEY_COUNT = 5
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { AxiosRequestConfig } from 'axios'
|
||||
import type { Readable } from 'stream'
|
||||
import type { URL } from 'url'
|
||||
import { proto } from '../../WAProto/index.js'
|
||||
import { MEDIA_HKDF_KEY_MAPPING } from '../Defaults'
|
||||
import type { MediaType } from '../Defaults'
|
||||
import type { BinaryNode } from '../WABinary'
|
||||
import type { GroupMetadata } from './GroupMetadata'
|
||||
import type { CacheStore } from './Socket'
|
||||
@@ -152,7 +152,6 @@ type RequestPhoneNumber = {
|
||||
requestPhoneNumber: boolean
|
||||
}
|
||||
|
||||
export type MediaType = keyof typeof MEDIA_HKDF_KEY_MAPPING
|
||||
export type AnyMediaMessageContent = (
|
||||
| ({
|
||||
image: WAMediaUpload
|
||||
|
||||
@@ -10,13 +10,12 @@ import { join } from 'path'
|
||||
import { Readable, Transform } from 'stream'
|
||||
import { URL } from 'url'
|
||||
import { proto } from '../../WAProto/index.js'
|
||||
import { DEFAULT_ORIGIN, MEDIA_HKDF_KEY_MAPPING, MEDIA_PATH_MAP } from '../Defaults'
|
||||
import { DEFAULT_ORIGIN, MEDIA_HKDF_KEY_MAPPING, MEDIA_PATH_MAP, type MediaType } from '../Defaults'
|
||||
import type {
|
||||
BaileysEventMap,
|
||||
DownloadableMessage,
|
||||
MediaConnInfo,
|
||||
MediaDecryptionKeyInfo,
|
||||
MediaType,
|
||||
MessageType,
|
||||
SocketConfig,
|
||||
WAGenericMediaMessage,
|
||||
|
||||
@@ -4,12 +4,18 @@ import { randomBytes } from 'crypto'
|
||||
import { promises as fs } from 'fs'
|
||||
import { type Transform } from 'stream'
|
||||
import { proto } from '../../WAProto/index.js'
|
||||
import { CALL_AUDIO_PREFIX, CALL_VIDEO_PREFIX, MEDIA_KEYS, URL_REGEX, WA_DEFAULT_EPHEMERAL } from '../Defaults'
|
||||
import {
|
||||
CALL_AUDIO_PREFIX,
|
||||
CALL_VIDEO_PREFIX,
|
||||
MEDIA_KEYS,
|
||||
type MediaType,
|
||||
URL_REGEX,
|
||||
WA_DEFAULT_EPHEMERAL
|
||||
} from '../Defaults'
|
||||
import type {
|
||||
AnyMediaMessageContent,
|
||||
AnyMessageContent,
|
||||
DownloadableMessage,
|
||||
MediaType,
|
||||
MessageContentGenerationOptions,
|
||||
MessageGenerationOptions,
|
||||
MessageGenerationOptionsFromContent,
|
||||
|
||||
Reference in New Issue
Block a user