Adeodato Simó
afad39bf80
Use $ instead of \Z for end of string
...
They're identical here, since re.M is not used, and the better-known
should be used, for readability.
2023-11-03 19:38:24 -03:00
Adeodato Simó
954a02126e
format_links: parse punctuation inside brackets
...
Also, consolidate all punctuation tests into a single table-driven one.
2023-11-03 19:38:24 -03:00
Adeodato Simó
294788aa1a
format_links: refactor; support multiple punctuation
2023-11-03 19:38:23 -03:00
Adeodato Simó
0043329cc1
Simplify literals in _wrapped
2023-10-09 21:09:52 -03:00
Adeodato Simó
c3c22022f6
Check for punctuation before checking for wrapping parenthesis
...
This allows to parse `(URL).` correctly, which was not detected
as URL before.
2023-10-09 21:09:51 -03:00
Mouse Reeve
a166af9990
Merge branch 'main' into report-actions
2023-08-06 16:00:59 -07:00
Mouse Reeve
211b60bba2
Merge pull request #2934 from bookwyrm-social/reduce-status-tasks
...
Only trigger add_status_task when status is first created
2023-08-01 08:30:43 -07:00
Mouse Reeve
f6fba19ac4
Only trigger add_status_task when status is first created
...
I think the reason I didn't do this initially was so that related users
and books, which are added necessarily after the model instance is
crated, will be part of the object when the task runs, but I have
investigated this and because of the transaction.atomic statement in the
to_model method in bookwyrm/activitypub/base_activity.py and in the
status view (added in this commit), this is not an issue.
2023-07-31 17:23:57 -07:00
Joachim
928d56b566
Fix function docstring
2023-07-31 22:15:09 +02:00
Joachim
e37ed8ea5e
Remove links trailing punctuation
2023-07-31 22:12:37 +02:00
Mouse Reeve
c6d23ba26a
Record statuses deleted in reports
2023-05-30 11:35:47 -07:00
Josh Soref
fb74c1977e
spelling: because
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Mouse Reeve
b76da26c98
Fixes iteration over mentions dict
2023-03-29 10:13:44 -07:00
Mouse Reeve
fe856bcf2c
Updates regex on mentions and hashtags
2023-03-29 09:20:58 -07:00
Mouse Reeve
8a0e88db83
Adds test for links with # symbols
2023-03-29 08:39:41 -07:00
Mouse Reeve
42dd199084
Unit test that identifies clashes between links and mentions
2023-03-29 08:28:45 -07:00
Mouse Reeve
4e9fad2091
Updates views that currently use the validator to use the redirect
...
helper
2023-03-20 10:27:52 -07:00
Christof Dorner
9ca9883e0b
Enable finding existing hashtags case-insensitive
...
We should store hashtags case-sensitive, but ensures that an existing
hashtag with different case are found and re-used. for example,
an existing #BookWyrm hashtag will be found and used even if the
status content is using #bookwyrm.
2023-03-07 13:16:45 +01:00
Christof Dorner
f3334b1550
Render hashtag links with data-mention="hashtag" attribute
2023-03-07 13:16:45 +01:00
Christof Dorner
ba0fcccfc5
Link hashtags in status content
2023-03-07 12:55:36 +01:00
Christof Dorner
c68304a99b
Parse hashtags and store them in CreateStatus view
2023-03-07 12:55:36 +01:00
Joachim
bc19d7c658
Black
2023-01-01 19:45:12 +01:00
Joachim
f266c71da9
Replace hidden field with HTTP Referrer value
2023-01-01 19:42:03 +01:00
Joachim
78c214a6d4
Add validation before using url
2022-12-30 17:56:25 +01:00
Joachim
f5a79dfa82
Redirect to "next" value in view
2022-12-23 21:35:28 +01:00
Mouse Reeve
317cf5fcf5
Generate fewer add_status_tasks
...
Previously, every time a status was saved, a task would start to add it
to people's timelines. This meant there were a ton of duplicate tasks
that were potentially heavy to run. Now, the Status model has a "ready"
field which indicates that it's worth updating the timelines. It
defaults to True, which prevents statuses from accidentally not being
added due to ready state.
The ready state is explicitly set to false in the view, which is the
source of most of the noise for that task.
2022-11-15 14:14:32 -08:00
Mouse Reeve
b0236b95bd
Merge branch 'main' into form-perms
2022-09-19 09:32:48 -07:00
Mouse Reeve
543d13af6e
Removes explicit calls to raise_not_editable from views
...
These raises are handled implicitly in the form, so they don't have to
be called outright.
2022-09-08 11:03:06 -07:00
Mouse Reeve
5c3bb2da13
Refactors how mentions are collected
...
This should be quicker, because it queries the users in one go instead
of jumping straight to iterating over them, and it checks if a user
blocks the poster before allowing them to be tagged.
2022-08-05 14:06:39 -07:00
Mouse Reeve
8f79b362f8
Check permissions automatically on form save
2022-08-05 09:56:32 -07:00
Mouse Reeve
7fdfd0c9c7
Check permissions when creating a status
2022-07-15 09:26:52 -07:00
Mouse Reeve
661865de87
Remmoves insecure redirects
...
This should really fundamentally work differently, but this is a quick
for for now to avoid an insecure redirect. There will be a negative
impact on user experience from this, and a followup change should look
into these views and improve their flow.
2022-07-14 11:22:17 -07:00
Mouse Reeve
7f78140015
Uses library for html cleanup
2022-07-04 13:21:13 -07:00
Mouse Reeve
007751c8cb
Adds error logging to status views
2022-05-26 10:58:11 -07:00
Mouse Reeve
cc2b774fb5
Updates wording on content warning field
2022-03-10 09:16:50 -08:00
Mouse Reeve
4ca90ca10f
Renames class view
2022-01-11 10:40:32 -08:00
Hugh Rundle
5b67226571
forceReload prevents ajax submission
...
...instead of weird hacky workarounds forcing refreshes later.
2021-11-25 19:12:03 +11:00
Hugh Rundle
a3270551f9
code cleanup
2021-11-20 19:19:51 +11:00
Hugh Rundle
4b6f5c9f51
remove out of date comment
2021-11-20 19:03:57 +11:00
Hugh Rundle
b273123708
code style
2021-11-20 16:06:16 +11:00
Hugh Rundle
12810d8e34
don't try to update non-existent readthroughs
2021-11-20 16:03:46 +11:00
Hugh Rundle
af9768a2e3
force page reload when adding status from move button
2021-11-20 14:59:59 +11:00
Mouse Reeve
117e6a08b2
Merge branch 'main' into markdown
2021-10-15 10:06:34 -07:00
Mouse Reeve
1b1e557800
Updates app to use date instead of boolean
2021-10-15 09:08:10 -07:00
Mouse Reeve
4002df04fc
Send update activity on edit
2021-10-15 08:15:48 -07:00
Mouse Reeve
0dba071126
Fixes editing replies
2021-10-14 19:14:47 -07:00
Mouse Reeve
af567ba05e
Edit posts in original markdown syntax
2021-10-14 18:34:26 -07:00
Mouse Reeve
01911d3b23
Update and indicate edit status
2021-10-14 17:33:45 -07:00
Mouse Reeve
2d1052766d
Fixes undefined variable error
2021-10-14 17:32:38 -07:00
Mouse Reeve
f5e52d6a11
Save updated statuses
2021-10-14 17:23:54 -07:00