Remove getter
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import {AppBskyActorDefs} from '@atproto/api'
|
||||||
import {
|
import {
|
||||||
BskyAgent,
|
BskyAgent,
|
||||||
ChatBskyConvoDefs,
|
ChatBskyConvoDefs,
|
||||||
@@ -91,6 +92,8 @@ export class Convo {
|
|||||||
private isFetchingHistory = false
|
private isFetchingHistory = false
|
||||||
private eventsCursor: string | undefined = undefined
|
private eventsCursor: string | undefined = undefined
|
||||||
|
|
||||||
|
sender: AppBskyActorDefs.ProfileViewBasic | undefined
|
||||||
|
|
||||||
private pastMessages: Map<
|
private pastMessages: Map<
|
||||||
string,
|
string,
|
||||||
ChatBskyConvoDefs.MessageView | ChatBskyConvoDefs.DeletedMessageView
|
ChatBskyConvoDefs.MessageView | ChatBskyConvoDefs.DeletedMessageView
|
||||||
@@ -108,10 +111,6 @@ export class Convo {
|
|||||||
private pendingEventIngestion: Promise<void> | undefined
|
private pendingEventIngestion: Promise<void> | undefined
|
||||||
private isProcessingPendingMessages = false
|
private isProcessingPendingMessages = false
|
||||||
|
|
||||||
get sender() {
|
|
||||||
return this.convo?.members.find(m => m.did === this.__tempFromUserDid)
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor(params: ConvoParams) {
|
constructor(params: ConvoParams) {
|
||||||
this.convoId = params.convoId
|
this.convoId = params.convoId
|
||||||
this.agent = params.agent
|
this.agent = params.agent
|
||||||
@@ -136,6 +135,9 @@ export class Convo {
|
|||||||
const {convo} = response.data
|
const {convo} = response.data
|
||||||
|
|
||||||
this.convo = convo
|
this.convo = convo
|
||||||
|
this.sender = this.convo.members.find(
|
||||||
|
m => m.did === this.__tempFromUserDid,
|
||||||
|
)
|
||||||
this.status = ConvoStatus.Ready
|
this.status = ConvoStatus.Ready
|
||||||
|
|
||||||
this.commit()
|
this.commit()
|
||||||
|
|||||||
Reference in New Issue
Block a user