Commit graph

778 commits

Author SHA1 Message Date
Mouse Reeve
21f67c9e28 Catch error response decoding json in search connector 2020-12-30 09:11:00 -08:00
Renato "Lond" Cerqueira
fb10cb35ad Add BookWyrm user-agent to http requests
This allows other software to identify BookWyrm in calls, as well as
will allow BookWyrm to differentiate between calls done from other
fediverse software and BookWyrm to answer with specific BookWyrm data.
2020-12-30 12:36:50 +01:00
Mouse Reeve
74a25f205b Validator for username field 2020-12-28 14:14:22 -08:00
Mouse Reeve
7e987fc446 Updates unit tests for new username handling
still some failing tho
2020-12-27 17:21:01 -08:00
Mouse Reeve
26c0880fe4
Merge pull request #425 from mouse-reeve/import-error
Fixes goodreads import failing on every book
2020-12-27 14:45:31 -08:00
Mouse Reeve
ac261d7b1a Send connector with search result
also fix typo in get_work_from_edition_data function
2020-12-27 14:33:34 -08:00
Anton Strömkvist
97a5364b70
Fix docstring for to_reject_activity 2020-12-27 23:31:14 +01:00
Mouse Reeve
9f74e95b00 stylistic cleanup of import model tests 2020-12-27 13:32:27 -08:00
Mouse Reeve
e89bfdc572 Makes registration user/localname fields more sensible 2020-12-24 11:39:57 -08:00
Mouse Reeve
25d72c5d1e Save attachments on incoming statuses 2020-12-23 13:38:36 -08:00
Mouse Reeve
365408e86b Handle reverse serialized fields with no serialized field 2020-12-23 13:33:46 -08:00
Mouse Reeve
a3df0847e1 Fixes celery tasks expanding data not setting many to many fields 2020-12-23 12:45:40 -08:00
Mouse Reeve
e7e90360b3 Adds model import 2020-12-22 10:28:04 -08:00
Mouse Reeve
c34d90051f
Merge pull request #416 from mouse-reeve/book-data-model
Remove sync fields and share fields between book and author
2020-12-22 10:25:12 -08:00
Mouse Reeve
9977fed007
Merge pull request #419 from mouse-reeve/close-suggested-post
Close suggested post
2020-12-22 10:23:23 -08:00
Mouse Reeve
7c3f2373c7 Adds noopener to link 2020-12-22 10:19:01 -08:00
Mouse Reeve
f2f2f3dd3e Remove useless if/else on null state radio button 2020-12-22 10:12:41 -08:00
Mouse Reeve
7d1cbb7be1 Adds tests for edit author view 2020-12-22 10:10:36 -08:00
Mouse Reeve
77948f64d2 Merge branch 'main' into book-data-model 2020-12-22 09:29:32 -08:00
Mouse Reeve
6ca8728d7c
Merge pull request #418 from mouse-reeve/edit-user-view
Edit user view
2020-12-22 09:28:21 -08:00
Mouse Reeve
25dee8362d Adds edit author form and stores last edited by 2020-12-22 09:26:55 -08:00
Mouse Reeve
fd2f452b46 Adds title along with alt attributes on images 2020-12-22 08:26:02 -08:00
Mouse Reeve
fdbce5d05e Adds close button to suggested post window on mobile 2020-12-22 08:21:43 -08:00
Mouse Reeve
db281d5154 Simplifies update user view 2020-12-21 16:19:36 -08:00
Mouse Reeve
fcce1a5a36 Fixes outgoing tests 2020-12-21 15:52:06 -08:00
Mouse Reeve
e6105c6cb0 Simplify edit user function 2020-12-21 14:54:45 -08:00
Mouse Reeve
65e9afd271 Fixes user in outgoing tests 2020-12-21 14:54:27 -08:00
Mouse Reeve
98aa946519 Merge branch 'main' into outgoing-tests 2020-12-21 14:39:39 -08:00
Mouse Reeve
fa1ddf359a create single outgoing tests file 2020-12-21 14:37:28 -08:00
Mouse Reeve
b4c60c0591 Catches exception thrown when boosting unknown statuses 2020-12-21 14:25:10 -08:00
Mouse Reeve
830aaf9d1c Add identifier fields to author activity 2020-12-21 13:21:17 -08:00
Mouse Reeve
15c22fa6c9 Merge branch 'main' into book-data-model 2020-12-21 13:16:40 -08:00
Mouse Reeve
1fb728edbd
Merge pull request #415 from mouse-reeve/author_text
Generate author_text field dynamically
2020-12-21 13:09:40 -08:00
Mouse Reeve
0de479a89f Fixes authors set in tests 2020-12-21 13:03:48 -08:00
Mouse Reeve
adfb1e696a typo in test 2020-12-21 12:49:33 -08:00
Mouse Reeve
bc64ae0504 Fixes assigning authors in test 2020-12-21 12:49:00 -08:00
Mouse Reeve
bcb972ddf7
Merge pull request #414 from mouse-reeve/openlibrary-covers
Fixes openlibrary import to prefer editions with covers
2020-12-21 12:45:09 -08:00
Mouse Reeve
862f1d2580 Fixes cover unit test 2020-12-21 12:22:47 -08:00
Mouse Reeve
cfa1a1b42c Remove sync fields and share fields between book and author 2020-12-21 12:17:18 -08:00
Mouse Reeve
aac264c998 Generate author_text field dynamically 2020-12-21 12:10:42 -08:00
Mouse Reeve
c3d0e8e7f7 Fixes openlibrary import to prefer editions with covers 2020-12-21 11:47:47 -08:00
Mouse Reeve
c4b9b82000 Use author name as a deduplication field
I feel iffy about this but openlibrary has hella duplicates
2020-12-20 13:31:11 -08:00
Mouse Reeve
e72c3e11dd Fixes incoming user test 2020-12-20 12:54:30 -08:00
Mouse Reeve
79973687d5 Updates tests 2020-12-20 12:50:35 -08:00
Mouse Reeve
3597ca460c Don't let author and book remote ids get overridden 2020-12-20 12:40:20 -08:00
Mouse Reeve
23cbeab4c1 cleans up remote version of quote status 2020-12-20 12:31:39 -08:00
Mouse Reeve
689cc65790 keep saved version of bio and description field as markdown 2020-12-20 12:24:17 -08:00
Mouse Reeve
60738011a2 user's name and bio field are optional
get it together, mouse
2020-12-20 12:09:19 -08:00
Mouse Reeve
7f1ac33859 Format html on book descriptions 2020-12-20 12:09:13 -08:00
Mouse Reeve
646df03d81 show books for authors who only have editions 2020-12-20 11:51:17 -08:00
Mouse Reeve
3f95f9257d
Merge pull request #411 from mouse-reeve/markdown-refinement
Only parse mardown on outgoing activities
2020-12-20 11:42:06 -08:00
Mouse Reeve
a6efd51bb2 Only parse mardown on outgoing activities 2020-12-20 11:38:13 -08:00
Mouse Reeve
fdb9b71030
Merge pull request #410 from mouse-reeve/atomicity
Change transaction atomic to avoid cascading errors
2020-12-20 11:24:37 -08:00
Mouse Reeve
592721ec76 Fixes unit tests 2020-12-19 20:26:29 -08:00
Mouse Reeve
ffa354be7c html format links and mentions 2020-12-19 20:03:33 -08:00
Mouse Reeve
ef696782ab Allow markdown in html fields 2020-12-19 18:54:56 -08:00
Mouse Reeve
1204679cbd Change transaction atomic to avoid cascading errors 2020-12-19 18:34:37 -08:00
Mouse Reeve
c407015a82 Fixes tests 2020-12-19 16:33:56 -08:00
Mouse Reeve
3e61f48da2 Fixes loading more data 2020-12-19 16:16:39 -08:00
Mouse Reeve
d3671d981f Use author activitypub in OL connector 2020-12-19 15:20:31 -08:00
Mouse Reeve
2128219b05 Use activitypub to_model de-serializer in openlibrary connector 2020-12-19 14:56:03 -08:00
Mouse Reeve
0c6049b81c Discard remote boosts 2020-12-18 12:38:27 -08:00
Mouse Reeve
606e93fb12 Hacky fix for serializing boost 2020-12-18 11:34:21 -08:00
Mouse Reeve
80de6079fa User p tags for pure status serializer 2020-12-18 11:00:30 -08:00
Mouse Reeve
40c4f4f5de Disable boosting private statuses 2020-12-18 09:30:08 -08:00
Mouse Reeve
3649642653 Show all authors 2020-12-17 15:14:52 -08:00
Mouse Reeve
be43e0772c box around create status on feed page 2020-12-17 14:13:28 -08:00
Mouse Reeve
73f94a76d2 Show subtitle in book page 2020-12-17 14:11:24 -08:00
Mouse Reeve
6149f36c7f Fixes bug in alt text breaing serializing work 2020-12-17 13:55:31 -08:00
Mouse Reeve
d024d44b79 Fixes incoming tests 2020-12-17 13:46:32 -08:00
Mouse Reeve
c4c01f4950
Merge pull request #404 from mouse-reeve/rate-action
Rate action
2020-12-17 13:25:35 -08:00
Mouse Reeve
666ae117d2
Merge pull request #403 from mouse-reeve/cover-max-width
Set max width on cover container
2020-12-17 13:24:49 -08:00
Mouse Reeve
d109ac0626
Merge pull request #402 from mouse-reeve/alt-text
Federate cover alt text
2020-12-17 13:22:09 -08:00
Mouse Reeve
5cadd48aef Fixes rate action 2020-12-17 13:21:21 -08:00
Mouse Reeve
dccd9ac052 uuids for content warners loaded correctly 2020-12-17 13:14:44 -08:00
Mouse Reeve
60239c867a Updates unit tests 2020-12-17 13:06:17 -08:00
Mouse Reeve
3f1bf4e1d6 Set max width on cover container 2020-12-17 12:57:56 -08:00
Mouse Reeve
530198adea Serialize alt text of images 2020-12-17 12:54:04 -08:00
Mouse Reeve
39dc0501a5 Make alt text a model property 2020-12-17 12:30:49 -08:00
Mouse Reeve
04ba5abf45 Fixes infinite recursion when loading books
Also fixes bug in serializing page nubmers
2020-12-17 12:02:59 -08:00
Mouse Reeve
2799ed68e3 Propogate content warning from parent 2020-12-17 11:32:09 -08:00
Mouse Reeve
34a2afc788 Change text on cw button 2020-12-17 11:05:37 -08:00
Mouse Reeve
172c36b641 Adds content warning field in status forms 2020-12-16 20:10:50 -08:00
Mouse Reeve
0d42b9cf8f Display status cw's 2020-12-16 19:50:36 -08:00
Mouse Reeve
b796686483 Adds cw field 2020-12-16 19:20:15 -08:00
Mouse Reeve
33c2f6c3b2 Merge branch 'main' into content-warnings 2020-12-16 19:14:34 -08:00
Mouse Reeve
f0767de363
Merge pull request #394 from mouse-reeve/sanitize-html
Sanitize html
2020-12-16 19:12:37 -08:00
Mouse Reeve
f7cb525981 Fixes logic error 2020-12-16 18:40:43 -08:00
Mouse Reeve
42167af3e9 Tests fro html field 2020-12-16 18:39:18 -08:00
Mouse Reeve
a3c7d324d6 Sanitize incoming html 2020-12-16 16:47:23 -08:00
Mouse Reeve
f1926ce76d Avoid duplicate notifitions
And render html
2020-12-16 16:20:40 -08:00
Mouse Reeve
d79a756813 Fixes pure status serializer 2020-12-16 15:59:42 -08:00
Mouse Reeve
ef92e562fd
Merge pull request #382 from mouse-reeve/switch-edition
Adds shelf info to book page
2020-12-16 14:58:36 -08:00
Mouse Reeve
21b0bec8d7 Switch edition from editions list page 2020-12-16 14:45:35 -08:00
Mouse Reeve
8a1800ea26 Federate shelve activities when switching editions 2020-12-16 13:59:18 -08:00
Mouse Reeve
5dbacb3524 Merge branch 'main' into switch-edition 2020-12-16 09:22:04 -08:00
Mouse Reeve
b2c1bc1481 Migration consistency 2020-12-16 09:20:24 -08:00
Mouse Reeve
729e50de63 Show consistent book status regardless of edition 2020-12-16 09:15:26 -08:00
Mouse Reeve
da05b99bb8 Fixes incoming shelve activity 2020-12-15 18:57:17 -08:00
Mouse Reeve
948e938040 Handles outdated Add with Book type
should be edition.
2020-12-15 18:16:33 -08:00
Mouse Reeve
af823cf645 Merge migration 2020-12-15 17:53:20 -08:00
Mouse Reeve
fabf880a94 Adds post attribute to resolve book endpoint 2020-12-15 16:50:10 -08:00
Mouse Reeve
bde75766f2 test for registration and password reset 2020-12-15 16:36:22 -08:00
Mouse Reeve
710fbc949b Better username validator and remove trailing whitespace 2020-12-15 15:52:22 -08:00
Mouse Reeve
ee2121095c Separate update editon and work functions 2020-12-15 12:39:09 -08:00
Mouse Reeve
2ef4df41b4 Fixes boosts 2020-12-15 11:54:57 -08:00
Mouse Reeve
8787599692 tests unfavorite 2020-12-14 13:04:07 -08:00
Mouse Reeve
1bcae45145 Remove notifications related to deleted statuses 2020-12-14 12:54:39 -08:00
Mouse Reeve
d49e49f021 Notify mentioned users 2020-12-14 12:31:11 -08:00
Mouse Reeve
8d27f02a9a Fixes typo in handle_unfollow 2020-12-14 11:46:31 -08:00
Mouse Reeve
171b8c75ae use require_POST decorator in inbox 2020-12-14 11:29:22 -08:00
Mouse Reeve
7f6390f722 Test incoming in one file 2020-12-14 10:25:43 -08:00
Mouse Reeve
badc5d0dab Adds another shelf model test 2020-12-14 10:18:14 -08:00
Mouse Reeve
61041a0dba Adds migration for privacy field
no actual change here, but it's a new field type
2020-12-13 21:11:53 -08:00
Mouse Reeve
b36eaef172 Merge branch 'main' into switch-edition 2020-12-13 21:10:37 -08:00
Mouse Reeve
693dfc42ac Match privacy level in reply 2020-12-13 16:20:59 -08:00
Mouse Reeve
943d97c0bc Adds direct messages UI 2020-12-13 16:17:14 -08:00
Mouse Reeve
4fcdbe5299 Fixes clashing test model name 2020-12-13 15:56:30 -08:00
Mouse Reeve
c75f5a1598 Unit tests for privacy model field 2020-12-13 15:50:02 -08:00
Mouse Reeve
5c7ac46116 Fixes foreign key field setting wrong value on activity 2020-12-13 14:53:25 -08:00
Mouse Reeve
44cbf7c07f Fixes checking privacy when serializing status 2020-12-13 14:35:56 -08:00
Mouse Reeve
b6907f39e9 Creates Privacy field that handles setting to/cc 2020-12-13 13:03:17 -08:00
Mouse Reeve
c470aeb3ce Create helper function on field for settings values 2020-12-13 12:02:26 -08:00
Mouse Reeve
b67aea22fc Aggregates (de)serializable model fields 2020-12-13 11:40:46 -08:00
Mouse Reeve
957f0889aa Clean up models
removes unused function and sorts replies correctly
2020-12-13 11:15:42 -08:00
Mouse Reeve
d65657882e Keep any status that mentions a local user 2020-12-12 21:11:51 -08:00
Mouse Reeve
ffc4cc2018 Fixes create status handler 2020-12-12 20:59:41 -08:00
Mouse Reeve
d3371991e1 Remove deleted util file from migrations 2020-12-12 20:18:03 -08:00
Mouse Reeve
ae435a3165 Removes sqlite support 😢
RIP, things have gotten too complicated for this I think
2020-12-12 20:11:23 -08:00
Mouse Reeve
47981dc15e Show year in time_since when ambiguous 2020-12-12 20:02:14 -08:00
Mouse Reeve
b61a7cccff Use trimmedwords_html instead of a custom filter 2020-12-12 19:34:51 -08:00
Mouse Reeve
1e08eeb4c2 Renames custom template tags file 2020-12-12 18:25:57 -08:00
Mouse Reeve
2b3daa0227 disable some warnings 2020-12-12 18:13:00 -08:00
Mouse Reeve
1e01e76ac2 removes unneeded imports 2020-12-12 18:06:48 -08:00
Mouse Reeve
aacf5b7ba4 fields for content warnings 2020-12-12 18:00:39 -08:00
Mouse Reeve
823da2e7de Re-create migration 2020-12-12 16:14:41 -08:00
Mouse Reeve
ae07bbffb7 Merge branch 'main' into logo-default 2020-12-12 16:03:23 -08:00
Mouse Reeve
9b7f0366e7 Adds site settings to initdb 2020-12-12 16:01:43 -08:00
Mouse Reeve
e58ef83f20 Fixes image fields breaking user import 2020-12-12 15:44:17 -08:00
Mouse Reeve
37aaaa97b2 Catch http erros for remote_id 2020-12-12 15:33:07 -08:00
Mouse Reeve
cb28c19abc Use get_data in resolving remote id 2020-12-12 15:19:57 -08:00
Mouse Reeve
49979fabef More user serialization tests 2020-12-12 15:00:20 -08:00
Mouse Reeve
eb28708230 Reverts site settings to correct state
this was just changed to debug tests
2020-12-12 14:33:51 -08:00
Mouse Reeve
e7f400533e Fixes missing book and user objects 2020-12-12 14:15:10 -08:00
Mouse Reeve
4ed713662e Fixes skipping refresh on matched object 2020-12-12 13:59:44 -08:00
Mouse Reeve
804066c523 a couple more assertions for testing fk field 2020-12-12 13:47:51 -08:00
Mouse Reeve
7c43fa1f7c Adds deduplication fields 2020-12-12 13:39:55 -08:00
Mouse Reeve
31a407d74a Use name field only for author name
It feels janky to remove a more granular name designation, but all these
first/last name fields were algorithmically populated by a dubious
process of splitting the name by a space character. If it makes sense to
have first/last name fields, it should be re-added with some
consideration.
2020-12-12 09:53:21 -08:00
Mouse Reeve
5cf9e24ae5 Fixes name import in openlibrary 2020-12-12 09:43:07 -08:00
Mouse Reeve
a176c6cd35 Creates merge migration 2020-12-12 09:38:05 -08:00