Aman Agrawal
f025415f2b
scheduled_messages: Add tests for delivery of scheduled messages.
2023-05-09 13:48:28 -07:00
Tim Abbott
602e4c2aa3
scheduled_messages: Add focused scheduled message indexes.
2023-05-09 13:48:28 -07:00
Tim Abbott
835f62617e
scheduled_messages: Store the final delivered message ID.
...
This could be useful for debugging problems with the system
operationally.
2023-05-09 13:48:28 -07:00
Tim Abbott
fe9656237e
scheduled_message: Move remaining logic out of management command.
...
While this doesn't include tests yet, it will make it much easier to
write tests for the core server logic here.
2023-05-09 13:48:28 -07:00
Tim Abbott
e0f6a7a48d
scheduled_messages: Avoid hardcoding minimum delay.
...
This deduplicates the 5 minutes calculation across the scheduled
messages code path.
2023-05-09 13:48:28 -07:00
Tim Abbott
20be0759b5
scheduled_message: Avoid delivering scheduled messages late.
2023-05-09 13:48:28 -07:00
Tim Abbott
a065576db7
scheduled messages: Call check_message at send time.
2023-05-09 13:48:28 -07:00
Tim Abbott
7051d3416b
scheduled_messages: Add reasonable failure handling.
...
Previously, it seemed possible for the scheduled messages API to try
to send infinite copies of a message if we had the very poor luck of a
persistent failure happening after a message was sent.
The failure_message field supports being able to display what happened
in the scheduled messages modal, though that's not exposed to the API
yet.
2023-05-09 13:48:28 -07:00
Tim Abbott
147e296e0a
scheduled_messages: Add defensive assert for double sends.
2023-05-09 13:48:28 -07:00
Tim Abbott
24bb03c89f
scheduled_messages: Add logging on successful send.
2023-05-09 13:48:28 -07:00
Tim Abbott
1fc6ed224a
scheduled_messages: Remove batching logic.
...
The previous logic would attempt to send a large number of unrelated
messages in a single transaction, which is just asking for trouble in
the event that one of the attempts fails.
2023-05-09 13:48:28 -07:00
Tim Abbott
d1dfab5b70
scheduled_messages: Live update #scheduled view after sending.
...
We apparently had neglected to send the actual event to clients that
the message was successfully sent.
2023-05-09 13:48:28 -07:00
Tim Abbott
c8f3443fb6
schedules_messages: Move logic out of management command.
2023-05-09 13:48:28 -07:00
Tim Abbott
611cee177d
deliver_scheduled_messages: Rename misleading message variable.
2023-05-09 13:48:28 -07:00
Hardik Dharmani
697cdb31e5
message_headers: Abbrevate direct message recipient names.
...
Abbrevated DM recipient names in message feeds, Drafts and Scheduled
messages overlays by wrapping recipient names in span with class
private_message_header_name and applying `overflow: hidden` and
`text-overflow: ellipsis` CSS to it.
Fixes #25353
2023-05-09 13:43:40 -07:00
Hardik Dharmani
99a988e220
message_header: Abbreviate topic names in all overlays.
...
Fixes #25353
2023-05-09 13:43:40 -07:00
Alex Vandiver
1285c39098
zerver: Remove now-unused report/ endpoints.
2023-05-09 13:16:28 -07:00
Alex Vandiver
64b277d845
blueslip: Reduce cardinality of blueslip.error() calls.
...
Particularly when grouping in Sentry, pushing the ids and such into
the additional data section helps group like errors together better.
2023-05-09 13:16:28 -07:00
Alex Vandiver
1769f981da
blueslip: Show more-info context in alert popup, if we have it.
2023-05-09 13:16:28 -07:00
Alex Vandiver
5d97dbf8b3
zblueslip: Show chained causes in unexpected messages.
2023-05-09 13:16:28 -07:00
Alex Vandiver
fa92895731
blueslip: Support nested Error objects by .cause.
2023-05-09 13:16:28 -07:00
Alex Vandiver
8e3a6d17bd
blueslip: Move BlueslipError into blueslip_stacktrace.ts.
...
Its existence is purely to add more context when displaying the
stacktrace.
2023-05-09 13:16:28 -07:00
Alex Vandiver
591b800ba4
blueslip: Pass original exception down into BlueslipError, if present.
2023-05-09 13:16:28 -07:00
Alex Vandiver
7898818983
blueslip: Pass the Error around, rather than re-creating a dummy one.
2023-05-09 13:16:28 -07:00
Alex Vandiver
52c613471a
blueslip: Add a more specific type.
2023-05-09 13:16:28 -07:00
Alex Vandiver
086e64dfe4
blueslip: More tightly annotate more_info.
2023-05-09 13:16:28 -07:00
Alex Vandiver
fea5a3fdb8
sentry: Always capture an Error, rather than a string.
...
We pass the original exception down as the `cause`, if present. This
makes Sentry properly capture the callstack.
2023-05-09 13:16:28 -07:00
Alex Vandiver
9d6ca32c59
sentry: Annotate all channel calls.
2023-05-09 13:16:28 -07:00
Alex Vandiver
c67cd5adb4
sent_messages: Remove from cache when message has been fully received.
...
There is no reason to keep these messages in a local memory store once
we have completed sending them and seen their events.
2023-05-09 13:16:28 -07:00
Alex Vandiver
3cc2adcd3b
sentry: Switch to using Sentry spans for message send timings.
2023-05-09 13:16:28 -07:00
Alex Vandiver
00ea197744
sentry: Switch to using Sentry spans for narrow/unnarrow timings.
2023-05-09 13:16:28 -07:00
Alex Vandiver
3ab22233f0
sentry: Add tracing extensions when Sentry is not enabled.
2023-05-09 13:16:28 -07:00
Alex Vandiver
8089cb70dd
sentry: Don't create spans for the longpoll or presence.
...
These will help Sentry skip span creation for these requests, which
are background events and not part of the pageload time.
2023-05-09 13:16:28 -07:00
Alex Vandiver
37c3cfb348
sentry: Do not start a navigation transaction on hash change.
2023-05-09 13:16:28 -07:00
Alex Vandiver
768ab19cd3
sentry: Do some basic URL client-side aggregation.
...
Doing client-side aggregation is better than letting Sentry try to
guess the grouping. While ideally this would be generated from the
Django routes, automatically parsing those to generate a route map is
quite difficult. We include basic numerical groupings, as well as the
few paths which have Confirmation objects.
2023-05-09 13:16:28 -07:00
Alex Vandiver
bfdc057e3a
sentry: Tag JS reports with the user's role.
...
User attributes are not indexed and searchable, unlike tags.
2023-05-09 13:16:28 -07:00
Alex Vandiver
e2a6a0c440
sentry: Stop importing from `@sentry/tracing`, which is deprecated.
...
This was deprecated in 7.47.0[^1].
[^1]: https://github.com/getsentry/sentry-javascript/releases/tag/7.47.0
2023-05-09 13:16:28 -07:00
Alex Vandiver
cadfbcac76
dependencies: Upgrade Sentry libraries.
2023-05-09 13:16:28 -07:00
Alex Vandiver
a9f51a0c02
static: Add Timing-Allow-Origin: * to allow sentry data timing.
...
This is required for the browser to provide detailed timing
information about resource fetches from other domains[^1].
[^1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Timing-Allow-Origin
2023-05-09 13:16:28 -07:00
Lauryn Menard
e44520c8fe
scheduled-messages: Limit `to` parameter to user and stream IDs.
...
For scheduled stream messages, we already limited the `to`
parameter to be the stream ID, but here we return a JsonableError
in the case of a ValueError when the passed value is not an integer.
For scheduled direct messages, we limit the list for the `to`
parameter to be user IDs. Previously, we accepted emails like
we do when sending messages.
2023-05-09 12:45:11 -07:00
sbansal1999
63fcfd543a
integrations: Add documentation for Notion-Zapier Integration.
...
Fixes #25314 .
2023-05-09 12:25:18 -07:00
sbansal1999
6e2423fe64
integrations: Update text in Zapier Documentation.
...
This commit updates the text to match the current version
displayed on the website.
2023-05-09 12:25:18 -07:00
Hardik Dharmani
3a358a9a11
tooltips: Shift all tooltip templates to tooltip_templates.hbs.
...
Refactored all tooltip templates with static content to be in
tooltip_templates.hbs to avoid duplicate IDs and DOM element.
Fixes #25324
2023-05-09 11:10:58 -07:00
Lauryn Menard
df17a1bf28
test-events: Test do_delete_message with no messages specified.
...
Test coverage for `zerver/actions/message_delete.py`.
Both callers of this function would already return if there were
no Messages specified to delete, which is why existing tests did
not cover this.
2023-05-09 09:58:33 -07:00
Hardik Dharmani
7ccfed65e8
tables: Fix table column dimensions on hover.
2023-05-09 09:41:34 -07:00
PALASH BADERIA
f93cf330d4
mailmap: Add entry for Palash Baderia.
2023-05-09 09:39:46 -07:00
Alex Vandiver
89d4737ab2
message_edit: Do not reuse user_profile variable in "for" loop.
...
Doing so causes the "username resolved this topic" or "this topic was
moved by username" notifications to be attributed to a random user who
had a visibility policy on the topic.
2023-05-09 09:38:38 -07:00
Tim Abbott
cce0c57a04
test-backend: Actions files should target full coverage.
...
We neglected to add this pattern when we split actions.py into a
directory.
2023-05-09 08:09:17 -07:00
Satyam Bansal
7f7c447d73
mailmap: Add entry for Satyam Bansal.
2023-05-09 07:47:44 -07:00
Tim Abbott
f6b7d8e561
mailmap: Add many mailmap entries.
2023-05-09 07:46:03 -07:00