commit 23aab6710a9a3e60217c1bf010877e07e34cedd2
parent ce599badee585b9535075f790021bf407f56e83a
Author: William Casarin <jb55@jb55.com>
Date: Wed, 10 May 2023 11:01:40 -0700
Fix DM sorting test
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/damus/Views/DMChatView.swift b/damus/Views/DMChatView.swift
@@ -228,13 +228,13 @@ func create_encrypted_event(_ message: String, to_pk: String, tags: [[String]],
func create_dm(_ message: String, to_pk: String, tags: [[String]], keypair: Keypair, created_at: Int64? = nil) -> NostrEvent?
{
- let created_at = Int64(Date().timeIntervalSince1970)
+ let created = created_at ?? Int64(Date().timeIntervalSince1970)
guard let keypair = keypair.to_full() else {
return nil
}
- return create_encrypted_event(message, to_pk: to_pk, tags: tags, keypair: keypair, created_at: created_at, kind: 4)
+ return create_encrypted_event(message, to_pk: to_pk, tags: tags, keypair: keypair, created_at: created, kind: 4)
}
extension View {