@ -45,7 +45,7 @@ public struct MessageViewModel: FetchableRecordWithRowId, Decodable, Equatable,
case state
case hasBeenReadByRecipient
case mostRecentFailureText
case isSender OpenGroup Moderator
case isSender ModeratorOrAdmin
case isTypingIndicator
case profile
case quote
@ -129,7 +129,7 @@ public struct MessageViewModel: FetchableRecordWithRowId, Decodable, Equatable,
public let state : Interaction . State
public let hasBeenReadByRecipient : Bool
public let mostRecentFailureText : String ?
public let isSender OpenGroup Moderator: Bool
public let isSender ModeratorOrAdmin : Bool
public let isTypingIndicator : Bool ?
public let profile : Profile ?
public let quote : Quote ?
@ -240,7 +240,7 @@ public struct MessageViewModel: FetchableRecordWithRowId, Decodable, Equatable,
state : ( state ? ? self . state ) ,
hasBeenReadByRecipient : self . hasBeenReadByRecipient ,
mostRecentFailureText : ( mostRecentFailureText ? ? self . mostRecentFailureText ) ,
isSender OpenGroup Moderator: self . isSender OpenGroup Moderator,
isSender ModeratorOrAdmin : self . isSender ModeratorOrAdmin ,
isTypingIndicator : self . isTypingIndicator ,
profile : self . profile ,
quote : ( quote ? ? self . quote ) ,
@ -302,7 +302,7 @@ public struct MessageViewModel: FetchableRecordWithRowId, Decodable, Equatable,
state : self . state ,
hasBeenReadByRecipient : self . hasBeenReadByRecipient ,
mostRecentFailureText : self . mostRecentFailureText ,
isSender OpenGroup Moderator: self . isSender OpenGroup Moderator,
isSender ModeratorOrAdmin : self . isSender ModeratorOrAdmin ,
isTypingIndicator : self . isTypingIndicator ,
profile : self . profile ,
quote : self . quote ,
@ -492,7 +492,7 @@ public struct MessageViewModel: FetchableRecordWithRowId, Decodable, Equatable,
state : self . state ,
hasBeenReadByRecipient : self . hasBeenReadByRecipient ,
mostRecentFailureText : self . mostRecentFailureText ,
isSender OpenGroup Moderator: self . isSender OpenGroup Moderator,
isSender ModeratorOrAdmin : self . isSender ModeratorOrAdmin ,
isTypingIndicator : self . isTypingIndicator ,
profile : self . profile ,
quote : self . quote ,
@ -745,7 +745,7 @@ public extension MessageViewModel {
self . state = . sent
self . hasBeenReadByRecipient = false
self . mostRecentFailureText = nil
self . isSender OpenGroup Moderator = false
self . isSender ModeratorOrAdmin = false
self . isTypingIndicator = isTypingIndicator
self . profile = nil
self . quote = quote
@ -794,7 +794,7 @@ public extension MessageViewModel {
expiresStartedAtMs : Double ? ,
expiresInSeconds : TimeInterval ? ,
state : Interaction . State = . sending ,
isSender OpenGroup Moderator: Bool ,
isSender ModeratorOrAdmin : Bool ,
currentUserProfile : Profile ,
quote : Quote ? ,
quoteAttachment : Attachment ? ,
@ -830,7 +830,7 @@ public extension MessageViewModel {
self . state = state
self . hasBeenReadByRecipient = false
self . mostRecentFailureText = nil
self . isSender OpenGroup Moderator = isSender OpenGroup Moderator
self . isSender ModeratorOrAdmin = isSender ModeratorOrAdmin
self . isTypingIndicator = false
self . profile = currentUserProfile
self . quote = quote
@ -985,10 +985,9 @@ public extension MessageViewModel {
WHERE (
\ ( groupMember [ . groupId ] ) = \ ( interaction [ . threadId ] ) AND
\ ( groupMember [ . profileId ] ) = \ ( interaction [ . authorId ] ) AND
\ ( SQL ( " \( thread [ . variant ] ) = \( SessionThread . Variant . community ) " ) ) AND
\ ( SQL ( " \( groupMember [ . role ] ) IN \( [ GroupMember . Role . moderator , GroupMember . Role . admin ] ) " ) )
)
) AS \ ( ViewModel . Columns . isSender OpenGroup Moderator) ,
) AS \ ( ViewModel . Columns . isSender ModeratorOrAdmin ) ,
\ ( profile . allColumns ) ,
\ ( quote [ . interactionId ] ) ,