Commit Graph

453 Commits

Author SHA1 Message Date
William Casarin d4faacb99f relays: strip trailing / from relay urls
Fixes: https://github.com/damus-io/damus/issues/1443
Changelog-Fixed: Fix issue with slashes on relay urls causing relay connection problems
2023-08-06 09:07:33 -07:00
William Casarin 5b9803d234 script: add build-git-hash.txt build output
Otherwise we get warnings
2023-08-06 07:54:23 -07:00
William Casarin d489bcc586 test: add test for failing nostr report event 2023-08-06 06:56:24 -07:00
William Casarin c0f4e3fe03 v1.6 (9) 2023-08-03 17:25:52 -07:00
William Casarin cebd1f48ca ndb: switch to nostrdb notes
This is a refactor of the codebase to use a more memory-efficient
representation of notes. It should also be much faster at decoding since
we're using a custom C json parser now.

Changelog-Changed: Improved memory usage and performance when processing events
2023-08-03 13:20:36 -07:00
William Casarin b556257edd util: add structured logger 2023-08-03 12:17:56 -07:00
Daniel D‘Aquino ef5a3030a6 Add unit tests surrounding creation of posts with non-latin hashtags, as well as the rendering of non-latin hashtag
Signed-off-by: Daniel D‘Aquino <daniel@daquino.me>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-08-03 12:17:32 -07:00
William Casarin d4aa8a5602 config: show git hash in version info
This will be useful for sanity checks and bisecting
2023-08-01 09:29:09 -07:00
William Casarin ff20cc4767 tests: enable code coverage 2023-07-31 03:25:50 -07:00
William Casarin b40c595a7c notify: switch over to new typesafe notifications 2023-07-30 11:02:44 -07:00
William Casarin 80063af19a notify: add typesafe notifications 2023-07-30 11:02:44 -07:00
William Casarin df3b94a1fc notify: add typesafe notify class 2023-07-30 11:02:44 -07:00
William Casarin 06a66a3709 add some type aliases to make the ndb move more incremental 2023-07-30 10:52:02 -07:00
Joel Klabo 480921db20 Suggested Users to Follow
ui: Add Suggested Users Views and Helpers
ui: Add Logic to Launch Suggested User Screen

Changelog-Added: Suggested Users to Follow
2023-07-29 10:25:24 -07:00
Suhail Saqan d11cd76e6a Add multiple reaction support
Changelog-Added: Add support for multiple reactions
Closes: https://github.com/damus-io/damus/issues/1335
2023-07-29 10:03:55 -07:00
William Casarin 2f8aa29e92 ndb: make NostrEvents immutable
Since we can't mutate NdbNotes, let's update the existing codebase to
generate and sign ids on NostrEvent constructions. This will allow us to
match NdbNote's constructor
2023-07-25 15:34:05 -07:00
William Casarin e34351ca37 ndb: fix iterators, pack id tags, more tests 2023-07-23 11:55:36 -07:00
William Casarin 7ec8da6c73 ndb: start implementing existing NostrEvent functionality
We eventually want to switch over to NdbNote instead of NostrEvent. To
facilitate this, the plan is to eventually make NostrEvent an alias of
NdbNote. For this to work, let's make sure the NostrEvent extensions are
implemented on NdbNote.

We will likely switch away from string properties as well, but for now
we will try to emulate as much as possible to make sure everything is
working first.
2023-07-22 17:19:47 -07:00
William Casarin 6d43754e71 ndb: add pubkey to NdbNote 2023-07-22 17:19:47 -07:00
William Casarin ad0e1f28b7 test: fix build and tests 2023-07-21 15:26:03 -07:00
William Casarin 61051ee853 nostrdb: add initial swift integration 2023-07-21 15:02:01 -07:00
William Casarin dc7826c4e5 c: add nostrdb c lib 2023-07-21 15:02:01 -07:00
William Casarin 4eee715bcd c: add jsmn json parser
This is used by the nostrdb lib. Let's add it here.
This doesn't unescape things, so we'll still need to do that manually.
2023-07-21 14:56:24 -07:00
William Casarin dd6c082a8e v1.6 (7) 2023-07-17 14:35:54 -07:00
William Casarin 12febf9671 view: extract ProfileEditButton to its own file
profile view file is getting cray cray
2023-07-17 13:25:56 -07:00
William Casarin 2c0296cce3 project: bump deployment target
not sure how this is different than the previous setting that was
updated.

Cc: Bryan Montz <bryanmontz@me.com>
2023-07-17 13:25:56 -07:00
William Casarin ff654c4e11 test: add text attribute testing function
This will be used for testing attributed strings
2023-07-17 10:25:09 -07:00
William Casarin fd59407171 test: fix old markdown tests 2023-07-17 10:25:09 -07:00
William Casarin cd7998b69d v1.6 (6) 2023-07-16 15:33:00 -07:00
William Casarin bd4c29604f Fix broken markdown renderer
This switches away from the old markdown renderer to the new one at
https://github.com/damus-io/swift-markdown-ui

Changelog-Fixed: Fix broken markdown renderer
2023-07-16 15:27:24 -07:00
William Casarin fc640b85ed add swift-markdown-ui
We will be using this lib which is much better than the builtin
framework for markdown rendering. We use a modified version that removes
html tag rendering which looks horrible.
2023-07-16 15:25:09 -07:00
William Casarin fb2a69acd8 project: fix test fixtures 2023-07-14 13:07:52 -07:00
tyiu 8a9e3ea76b Fix localization issues and export strings for translation
Changelog-Fixed: Fix localization issues and export strings for translation
Signed-off-by: Terry Yiu <git@tyiu.xyz>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-07-14 09:34:29 -07:00
William Casarin 9879c78e41 build 5 because I broked something 2023-07-13 15:43:21 -07:00
William Casarin e36747a81a v1.6 (4) 2023-07-13 11:13:50 -07:00
William Casarin 17df2972d9 ui: add follow hashtag ui on search view 2023-07-13 11:08:04 -07:00
William Casarin 7b73a54de5 test: switch to test data file
We only added the file before, let's actually use it now
2023-07-13 07:32:27 -07:00
William Casarin 7046fe0d4f ui: add DamusBackground helper
We will be using this in more places
2023-07-13 06:56:23 -07:00
William Casarin 69922b1d77 Remove LoadMoreButton
Was an old unused thing
2023-07-12 08:21:44 -07:00
William Casarin 7f9371d85f v1.6 (3) 2023-07-11 12:58:15 -07:00
William Casarin 031c7823ae refactor: move hashtag tests to their own file 2023-07-11 07:21:16 -07:00
William Casarin 45d9121ed7 fix project issues 2023-07-10 20:56:52 -07:00
William Casarin 374610a21a artifacts: allow unseparated note artifacts
This is needed for longform events. Right now we treat unseparated note
artifacts as a list of blocks, but we will likely need to render these
blocks into lists of attributed texts with image blocks inbetween.
2023-07-10 18:24:43 -07:00
William Casarin 4d995fd04c Longform Notes 2023-07-10 17:39:13 -07:00
William Casarin 518886912c refactor: carve out TextEvent body into EventShell
We'll need this for other event types
2023-07-10 17:39:13 -07:00
Joel Klabo bf95a8b328 Banner Image Upload
Changelog-Added: Enable banner image editing
2023-07-10 17:27:42 -07:00
William Casarin 15d633a42f project: update to recommend settings 2023-07-10 11:08:20 -07:00
tyiu 140c3505ba Update translations 2023-07-09 15:36:35 -04:00
Bryan Montz 51d71f11c1 replace RelayMetadatas with RelayModelCache in DamusState
Signed-off-by: Bryan Montz <bryanmontz@me.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-07-09 07:40:39 -07:00
Bryan Montz f619fef410 add RelayModel and RelayModelCache classes
Signed-off-by: Bryan Montz <bryanmontz@me.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-07-09 07:40:39 -07:00