1
0
mirror of git://jb55.com/damus synced 2024-09-18 19:23:49 +00:00
Commit Graph

40 Commits

Author SHA1 Message Date
Grimless
f6f7d13f12 Properly implement top-level tests and fix one test using the wrong Block conversion property
Closes: https://github.com/damus-io/damus/pull/1528
Reviewed-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-09-03 18:02:32 -07:00
Grimless
6ee0be40e9 Create helper extensions for Block and update tests for the Block helper model
Closes: https://github.com/damus-io/damus/pull/1528
Signed-off-by: William Casarin <jb55@jb55.com>
2023-09-03 18:02:32 -07:00
Jon Marrs
dd29e87146 test: pass keypair instead of privkey for test cases
Tests were not building due to recent changes in the Damus source code that replaced privkey with keypair. This patch extends those changes to the test cases, allowing the tests to build and pass.

Signed-off-by: Jon Marrs <jdmarrs@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-08-31 08:52:28 -07:00
William Casarin
cf3a9a576d test: move existing url tests to UrlTests 2023-08-06 13:50:20 -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
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
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
1135c19fea test: add setting property tests
Some initial UserSettingsStore property tests
2023-07-16 13:05:18 -07:00
William Casarin
0c95071de7 project: rename parse_mentions to parse_note_content
This is more accurate
2023-07-16 11:46:23 -07:00
William Casarin
db2ec0a00a Fix npub mention bugs, fix slowness when parsing large posts
Switch the post parser to use the same code as the content parser. This
was causing many issues, including performance issues.

Changelog-Fixed: Fix lag when creating large posts
Changelog-Fixed: Fix npub mentions failing to parse in some cases
Changelog-Added: Add r tag when mentioning a url
Changelog-Removed: Remove old @ and & hex key mentions
2023-07-11 09:15:13 -07:00
William Casarin
031c7823ae refactor: move hashtag tests to their own file 2023-07-11 07:21:16 -07:00
cr0bar
ac2b5b26bb Added non-latin test and amended emoji test to include emoji in hashtag 2023-07-11 06:39:12 -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
7940e6fd32 Fix tests 2023-04-23 04:36:16 -07:00
Terry Yiu
bff3c0dd52 Improve sats numeric entry for zaps
Changelog-Changed: Add number formatting for sats entry and use selected zaps amount from picker as placeholder
Changelog-Fixed: Do not allow non-numeric characters for sats amount and fix numeric entry for other number systems for all locales
2023-04-17 15:20:14 -07:00
William Casarin
b131c74ee3 Add prefix and suffix string trimming functions
This is needed to fix extraneous whitespace issues in image posts
2023-04-05 12:48:03 -07:00
Gert Goet
f0df4aa218 Strip common punctuations from URLs
Changelog-Fixed: Fix punctuation getting included in some urls
Closes: #575
2023-02-13 10:03:35 -08:00
Gert Goet
bb9fc6f905 Always stop at first whitespace 2023-02-13 10:03:17 -08:00
William Casarin
4f2bacfaab Configurable zap amount 2023-02-10 13:52:27 -08:00
William Casarin
d5b6d935e8 fix tests 2023-02-10 11:08:28 -08:00
William Casarin
10596ddb09 Relay Filters
wip
2023-02-09 14:23:18 -08:00
William Casarin
552bd9cae5 Implement NIP-21 URI handling
Changelog-Added: Added nostr: uri handling
2023-01-28 08:31:11 -08:00
William Casarin
9d2ff2fe65 Fix commas and emojis getting included in hashtags
Changelog-Fixed: Fix commands and emojis getting included in hashtags
2023-01-22 09:57:00 -08:00
Joel Klabo
13ea42a2e2 Don't Parse URL with Only Whitespace 2023-01-22 09:49:41 -08:00
Terry Yiu
4f4557e4b6 Replace deprecated Data.withUnsafeMutableBytes call
Closes: #214
2023-01-02 08:19:47 -08:00
William Casarin
9b7057de36 make url and invoice parsing case-insensitive
Signed-off-by: William Casarin <jb55@jb55.com>
2022-10-19 09:51:25 -07:00
William Casarin
a47645929e Inline image loading
Changelog-Added: Added inline image loading
Signed-off-by: William Casarin <jb55@jb55.com>
2022-10-16 16:11:27 -07:00
William Casarin
cb70ab532c Use the t tag for hashtags
Changelog-Changed: #hashtags now use the `t` tag instead of `hashtag`
Signed-off-by: William Casarin <jb55@jb55.com>
2022-08-19 07:38:13 -07:00
William Casarin
cac139fff1 hashtags working
Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-09 11:43:18 -07:00
William Casarin
cf7cba09bd parse hashtags
Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-08 20:34:57 -07:00
William Casarin
5e63eca0e9 simplify like refs
Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-08 19:01:42 -07:00
William Casarin
8896d19f40 initial reply revamp
It now understands mentions

Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-08 10:25:50 -07:00
William Casarin
4db06b015c event mentions working
Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-07 17:48:00 -07:00
William Casarin
0ad17c05fe add some more tests
Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-07 13:54:27 -07:00
William Casarin
0eb1372937 more mention progress
Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-07 13:50:19 -07:00
William Casarin
73652513d9 initial mention parsing
Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-04 21:33:08 -07:00
William Casarin
96d8d854e2 test invalid mention
Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-04 16:54:10 -07:00
William Casarin
cfc21219d3 more mention parsing tests
Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-04 16:52:01 -07:00
William Casarin
f42bc2e91e likes, mention parsing, lots of stuff
Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-04 16:26:10 -07:00
William Casarin
f4bb07081f initial commit
Signed-off-by: William Casarin <jb55@jb55.com>
2022-04-02 16:57:42 -07:00