Skip to content

Commit

Permalink
fix(chat/messages): use timestamp instead of whisperTimestamp
Browse files Browse the repository at this point in the history
iterates: #8962
  • Loading branch information
osmaczko committed Jan 17, 2023
1 parent 34cf8b6 commit 9a2e1cd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/app/modules/main/activity_center/module.nim
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,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,
Expand Down Expand Up @@ -334,7 +334,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,
Expand Down Expand Up @@ -625,7 +625,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,
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/main/chat_section/chat_content/module.nim
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,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,
Expand Down
2 changes: 0 additions & 2 deletions src/app_service/service/message/dto/message.nim
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ type TransactionParameters* = object
type MessageDto* = object
id*: string
communityId*: string
whisperTimestamp*: int64
`from`*: string
alias*: string
seen*: bool
Expand Down Expand Up @@ -199,7 +198,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)
Expand Down

0 comments on commit 9a2e1cd

Please sign in to comment.