fix(chat/messages): use timestamp instead of whisperTimestamp

iterates: #8962
This commit is contained in:
Patryk Osmaczko 2023-01-16 19:29:30 +01:00 committed by osmaczko
parent 8644c841d4
commit b242624c47
4 changed files with 5 additions and 7 deletions

View File

@ -91,7 +91,7 @@ proc createMessageItemFromDto(self: Module, message: MessageDto, chatDetails: Ch
message.image,
message.containsContactMentions(),
message.seen,
timestamp = message.whisperTimestamp,
timestamp = message.timestamp,
clock = message.clock,
ContentType(message.contentType),
message.messageType,

View File

@ -228,7 +228,7 @@ method newMessagesLoaded*(self: Module, messages: seq[MessageDto], reactions: se
message.image,
message.containsContactMentions(),
message.seen,
timestamp = message.whisperTimestamp,
timestamp = message.timestamp,
clock = message.clock,
message.contentType.ContentType,
message.messageType,
@ -341,7 +341,7 @@ method messagesAdded*(self: Module, messages: seq[MessageDto]) =
message.image,
message.containsContactMentions(),
message.seen,
timestamp = message.whisperTimestamp,
timestamp = message.timestamp,
clock = message.clock,
message.contentType.ContentType,
message.messageType,
@ -638,7 +638,7 @@ method getMessageById*(self: Module, messageId: string): message_item.Item =
message.image,
message.containsContactMentions(),
message.seen,
timestamp = message.whisperTimestamp,
timestamp = message.timestamp,
clock = message.clock,
message.contentType.ContentType,
message.messageType,

View File

@ -181,7 +181,7 @@ proc buildPinnedMessageItem(self: Module, messageId: string, actionInitiatedBy:
message.image,
message.containsContactMentions(),
message.seen,
timestamp = message.whisperTimestamp,
timestamp = message.timestamp,
clock = message.clock,
message.contentType.ContentType,
message.messageType,

View File

@ -85,7 +85,6 @@ type TransactionParameters* = object
type MessageDto* = object
id*: string
communityId*: string
whisperTimestamp*: int64
`from`*: string
alias*: string
seen*: bool
@ -205,7 +204,6 @@ proc toMessageDto*(jsonObj: JsonNode): MessageDto =
result = MessageDto()
discard jsonObj.getProp("id", result.id)
discard jsonObj.getProp("communityId", result.communityId)
discard jsonObj.getProp("whisperTimestamp", result.whisperTimestamp)
discard jsonObj.getProp("from", result.from)
discard jsonObj.getProp("alias", result.alias)
discard jsonObj.getProp("seen", result.seen)