Convert findLast
This commit is contained in:
@@ -157,9 +157,12 @@ function HeaderReady({
|
||||
moderation.ui('displayName'),
|
||||
)
|
||||
|
||||
const latestMessageFromOther = convoState.items.findLast(
|
||||
item => item.type === 'message' && item.message.sender.did === profile.did,
|
||||
)
|
||||
const latestMessageFromOther = convoState.items
|
||||
.reverse()
|
||||
.find(
|
||||
item =>
|
||||
item.type === 'message' && item.message.sender.did === profile.did,
|
||||
)
|
||||
|
||||
const latestReportableMessage =
|
||||
latestMessageFromOther?.type === 'message'
|
||||
|
||||
Reference in New Issue
Block a user