Chat: use correct profile views
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
AppBskyActorDefs,
|
|
||||||
BskyAgent,
|
BskyAgent,
|
||||||
|
ChatBskyActorDefs,
|
||||||
ChatBskyConvoDefs,
|
ChatBskyConvoDefs,
|
||||||
ChatBskyConvoGetLog,
|
ChatBskyConvoGetLog,
|
||||||
ChatBskyConvoSendMessage,
|
ChatBskyConvoSendMessage,
|
||||||
@@ -80,8 +80,8 @@ export class Convo {
|
|||||||
|
|
||||||
convoId: string
|
convoId: string
|
||||||
convo: ChatBskyConvoDefs.ConvoView | undefined
|
convo: ChatBskyConvoDefs.ConvoView | undefined
|
||||||
sender: AppBskyActorDefs.ProfileViewBasic | undefined
|
sender: ChatBskyActorDefs.ProfileViewBasic | undefined
|
||||||
recipients: AppBskyActorDefs.ProfileViewBasic[] | undefined = undefined
|
recipients: ChatBskyActorDefs.ProfileViewBasic[] | undefined = undefined
|
||||||
snapshot: ConvoState | undefined
|
snapshot: ConvoState | undefined
|
||||||
|
|
||||||
constructor(params: ConvoParams) {
|
constructor(params: ConvoParams) {
|
||||||
@@ -445,7 +445,7 @@ export class Convo {
|
|||||||
throw new Error('Convo: could not find recipients in convo')
|
throw new Error('Convo: could not find recipients in convo')
|
||||||
}
|
}
|
||||||
|
|
||||||
const userIsDisabled = this.sender.chatDisabled as boolean
|
const userIsDisabled = Boolean(this.sender.chatDisabled)
|
||||||
|
|
||||||
if (userIsDisabled) {
|
if (userIsDisabled) {
|
||||||
this.dispatch({event: ConvoDispatchEvent.Disable})
|
this.dispatch({event: ConvoDispatchEvent.Disable})
|
||||||
@@ -511,8 +511,8 @@ export class Convo {
|
|||||||
private pendingFetchConvo:
|
private pendingFetchConvo:
|
||||||
| Promise<{
|
| Promise<{
|
||||||
convo: ChatBskyConvoDefs.ConvoView
|
convo: ChatBskyConvoDefs.ConvoView
|
||||||
sender: AppBskyActorDefs.ProfileViewBasic | undefined
|
sender: ChatBskyActorDefs.ProfileViewBasic | undefined
|
||||||
recipients: AppBskyActorDefs.ProfileViewBasic[]
|
recipients: ChatBskyActorDefs.ProfileViewBasic[]
|
||||||
}>
|
}>
|
||||||
| undefined
|
| undefined
|
||||||
async fetchConvo() {
|
async fetchConvo() {
|
||||||
@@ -520,8 +520,8 @@ export class Convo {
|
|||||||
|
|
||||||
this.pendingFetchConvo = new Promise<{
|
this.pendingFetchConvo = new Promise<{
|
||||||
convo: ChatBskyConvoDefs.ConvoView
|
convo: ChatBskyConvoDefs.ConvoView
|
||||||
sender: AppBskyActorDefs.ProfileViewBasic | undefined
|
sender: ChatBskyActorDefs.ProfileViewBasic | undefined
|
||||||
recipients: AppBskyActorDefs.ProfileViewBasic[]
|
recipients: ChatBskyActorDefs.ProfileViewBasic[]
|
||||||
}>(async (resolve, reject) => {
|
}>(async (resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
const response = await networkRetry(2, () => {
|
const response = await networkRetry(2, () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user