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