Methods
changeThreadColor
- changeThreadColor(threadId: FacebookId, color: string): Promise<void>
-
Parameters
-
threadId: FacebookId
-
color: string
Returns Promise<void>
getCurrentUserId
- getCurrentUserId(): FacebookId
getThreadHistory
- getThreadHistory(threadId: FacebookId, amount: number, timestamp?: undefined | number): Promise<Message[]>
-
Parameters
-
threadId: FacebookId
-
amount: number
-
Optional timestamp: undefined | number
Returns Promise<Message[]>
getThreadInfo
- getThreadInfo(threadId: FacebookId): Promise<ThreadInfo>
-
Parameters
Returns Promise<ThreadInfo>
getUserId
- getUserId(name: string): Promise<UserIdSearchResult[]>
-
Parameters
Returns Promise<UserIdSearchResult[]>
getUserInfo
- getUserInfo(ids: FacebookId | FacebookId[]): Promise<UserInfoResult>
-
Parameters
-
ids: FacebookId | FacebookId[]
Returns Promise<UserInfoResult>
handleMessageRequest
- handleMessageRequest(threadId: FacebookId, shouldAccept: boolean): Promise<void>
-
Parameters
-
threadId: FacebookId
-
shouldAccept: boolean
Returns Promise<void>
listen
- listen(handler: MessageHandler): StopListeningFunction
-
Parameters
Returns StopListeningFunction
markAsRead
- markAsRead(threadId: FacebookId): Promise<void>
-
Parameters
Returns Promise<void>
resolvePhotoUrl
- resolvePhotoUrl(photoId: FacebookId): Promise<string>
-
Parameters
Returns Promise<string>
sendMessage
- sendMessage(threadId: FacebookId, message: OutgoingMessage | string): Promise<Message>
-
Parameters
-
threadId: FacebookId
-
message: OutgoingMessage | string
Returns Promise<Message>
sendTypingIndicator
- sendTypingIndicator(threadId: FacebookId): Promise<EndTypingIndicatorFunction>
-
Parameters
Returns Promise<EndTypingIndicatorFunction>
setMessageReaction
- setMessageReaction(messageId: FacebookId, reaction: Reaction | string): Promise<void>
-
Parameters
-
messageId: FacebookId
-
reaction: Reaction | string
Returns Promise<void>