Commit Graph

36168 Commits

Author SHA1 Message Date
Anders Kaseorg 0a61754635 mailmap: Add Git .mailmap for zulipchat.com → zulip.com.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-05-14 14:16:28 -07:00
Gillian Pantaleon 7a943601bc messagebox: Add title-text for user profile on sender name and avatar.
A separate outer span with the title text needs to be added because:

(1) The default bootstrap popover behavior takes the title as the
popover title, if provided.
(2) We need to avoid having the title area be too big in the
me_message template.

Fixes #12769.

Co-Author-By: Vaibhav <vrongmeal@gmail.com>
2020-05-14 14:07:41 -07:00
Puneeth Chaganti 734d651b45 home: Fix furthest read time when user has multiple clients.
The query to fetch the latest user activity was missing an
`.order_by('last_visit')`. This meant that the results were being
ordered by the `id`, which resulted in us getting `update_message_flags`
action performed on the client that the user installed last, instead of
being client agnostic and fetching the "global" last
`update_message_flags` action performed by the user.
2020-05-14 13:38:09 -07:00
Hemanth V. Alluri 7e7847b55a webhooks/stripe: Add support for pyr_ events.
"pyr_" events are like refund events some source called it a pseudo
refund event (https://stackoverflow.com/questions/46296374/how-can-
i-get-the-original-charge-and-refund-ids-of-an-automatic-payout).
Though due to the lack of any documentation on this event I'm not
confident if this is the right fix.

Signed-off-by: Hemanth V. Alluri <hdrive1999@gmail.com>
2020-05-14 12:02:30 -07:00
Hemanth V. Alluri 20b39bd54e webhooks/stripe: Update refund updated event message.
Also add missing test coverage for this event.

Signed-off-by: Hemanth V. Alluri <hdrive1999@gmail.com>
2020-05-14 12:02:30 -07:00
arpit551 1427270df4 ci: Correct notify_failure_status in circleci config. 2020-05-14 11:58:26 -07:00
Mateusz Mandera 28a6983b34 check-rabbitmq-queue: Log queue size in "queue stuck" alert. 2020-05-14 11:55:20 -07:00
Anders Kaseorg 5ee80c70e2 dependencies: Move zulip-js to devDependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-05-14 00:30:35 -07:00
João Maurício Carvalho 41afdc6526 compose.js: Fix compose box didn't collapse.
Fix a bug where the compose box didn't collapse when sending a message
from the preview area by hitting the send button. The bug ocurred because
the preview area wasn't being properly cleared when this flow was executed.
This was fixed by moving the clear_preview_area function call for a place
that will be reached by both the enter and button flow.

Fixes: #14889
2020-05-13 15:33:07 -07:00
Aman Agrawal 1a8798d9c5 ci: Disable casper tests in ci due to flaky behaviour. 2020-05-13 14:02:06 -07:00
Kartik Srivastava 7f9207c6b7 dependencies: Install zulip-js npm package. 2020-05-13 10:25:10 -07:00
Rohitt Vashishtha 6a3e245fe3 settings_org: Handle dropdown list widget updates inside module.
Previously, we handled these updates in server_events_dispatch
and could accidentally call widget.render() before initializing
the widget.

Original report: https://chat.zulip.org/#narrow/near/875608.

The sync_realm_settings function ensures that if the settings are
not open, any updates are a noop.
2020-05-13 10:08:51 -07:00
Rohitt Vashishtha e2b0a4cba1 list-widget: Rename settings_list_widget => dropdown_list_widget.
We want to use this widget outside of the settings panels as well.
2020-05-13 10:08:51 -07:00
majordwarf 587b5473c2 css: Use SCSS nesting in settings.scss for `input`. 2020-05-12 23:17:27 -07:00
majordwarf cd2cf1a1aa css: Reorder settings.scss for `input` and remove unused rulesets. 2020-05-12 23:17:27 -07:00
majordwarf 298d2c5a17 css: Use SCSS nesting in settings.scss for `.input-group`. 2020-05-12 23:17:27 -07:00
majordwarf 03a95cfe49 css: Use SCSS nesting in settings.scss for `.dynamic-input`. 2020-05-12 23:17:27 -07:00
majordwarf 1384050683 css: Use SCSS nesting for child elements of `.dynamic-input`. 2020-05-12 23:17:27 -07:00
majordwarf 5af7665b3c css: Reorder `.dynamic-input` to put next to each other. 2020-05-12 23:17:27 -07:00
majordwarf 6371f0109c Use: SCSS nesting in settings.scss for `.table` in `#admin-user-list`. 2020-05-12 23:17:27 -07:00
majordwarf 70ef0e9232 css: Use SCSS nesting in settings.scss for `.settings-info-icon`. 2020-05-12 23:17:27 -07:00
majordwarf 796d3c2e7f css: Use SCSS nesting in settings.scss for `#settings_content`. 2020-05-12 23:17:27 -07:00
majordwarf 806269fc40 css: Reorder `#settings_content` to put next to each other. 2020-05-12 23:17:27 -07:00
majordwarf f6b3aa4e8b css: Use SCSS nesting for avatar, logo and icon selectors. 2020-05-12 23:17:27 -07:00
majordwarf 8543750d43 css: Reorder avatar, logo and icon selection next to each other. 2020-05-12 23:17:27 -07:00
majordwarf cc21c45c7a css: Refactor `.inline-block` in settings.scss. 2020-05-12 23:17:27 -07:00
majordwarf 02516c6f69 css: Use SCSS nesting in settings.scss for `.user-avatar-selection`. 2020-05-12 23:17:27 -07:00
majordwarf 895945b165 css: Reorder `.user-avatar-selection` to put next to each other. 2020-05-12 23:17:27 -07:00
majordwarf aed2450cc0 css: Use SCSS nesting in settings.scss for `label`. 2020-05-12 23:17:27 -07:00
majordwarf bc6baa9f2b css: Reorder `label` next to put next to each other. 2020-05-12 23:17:27 -07:00
orientor 9170931da3 openapi: Add test for validating examples.
Zulip's openapi specification in zulip.yaml has various examples
for various schemas. Validate the example with their respective
schemas to ensure that all the examples are schematically correct.

Part of #14100.
2020-05-12 23:03:06 -07:00
orientor fab2ec9e63 openapi: Rectify wrong examples and schemas.
Some examples mentioned in zulip.yaml did not match their schema.
Change either the schema or the example so that all examples are
valid with respect to their schemas.
2020-05-12 23:03:06 -07:00
Tim Abbott 35139ac559 api: Remove email field from realm_user and realm_bot events.
The `email` field for identifying the user being modified in these
events was not used by either the webapp or other official Zulip
clients.  Instead, it was legacy data from before we switched years
ago to sending user_id fields as the correct way to uniquely identify
a user.
2020-05-12 17:46:13 -07:00
cestrell 297185cc12 integrations: Use new function in Github releases.
Use get_release_event_message from webhooks/git.py to format release
events using the newly implemented release message template.

Tweaked by tabbott to handle name=None.

Builds on #14746. Proposed in #14934.
2020-05-12 17:42:49 -07:00
cestrell e3f0b2f20f integrations: Add Gogs webhook for release event.
Extends Gogs integrations in order to support a published release.
Tested on my local Ubuntu development server running on WSL2.

Fixes #14746.
2020-05-12 17:39:38 -07:00
Tim Abbott f642a0fc89 addressee: Remove obsolete parsing functions.
These became unused in c971576b00.
2020-05-12 17:33:11 -07:00
Tim Abbott 496c08e26c slack import: Fix DefaultStream import of deactivated #random.
If the #random channel in Slack is deactivated, we should follow
Zulip's data model of not allowing deactivated, default streams.

This had apparently happened in zulipchat.com for a few organizations,
resulting in weird exceptions trying to invite new users.
2020-05-12 17:18:57 -07:00
Rohan Prashant 44a56a66d0 tests-backend: Bring stream_recipient.py to 100 percent coverage.
Fixes part of #7089.
2020-05-12 16:43:01 -07:00
clarammdantas 77195f94c1 stream_settings: Don't remove stream_row if in "All Streams" tab.
If you were on "All Streams" tab and unsubscribed to a private
stream, that stream row would momentarily disappear. If you
click again on "All Streams" button, it would appear again.

The problem was that the selector was finding two elements
instead of just the tab element. To solve this we used a more
specific selector to make sure we are getting the Subscribed
tab only.
2020-05-12 14:14:13 -07:00
Tim Abbott 779daa5374 help: Suggest restarting server during Slack import.
This reduces the risk of folks running into OOM kills when going
through the data import process on servers with a minimal 2GB of RAM.
2020-05-12 13:24:10 -07:00
sahil839 2491bcdd84 realm_logo: Fix incorrect display of realm logo delete button.
This commit fixes the bug of incorrectly showing/hiding the
realm logo delete button by using realm_night_logo_source for
checking the source of night mode logo instead of previously
used realm_logo_source for both day and night logos.
2020-05-12 11:59:06 -07:00
Rohitt Vashishtha 12836d6f0a typeahead: Advertise default codeblock language. 2020-05-12 11:40:12 -07:00
clarammdantas 7e9024a39c popovers.js: Add version to user avatar request.
When a user changes its avatar image, the user's avatar in popovers
wasn't being correctly updated, because of browser caching of the
avatar image.  We added a version on the request to get the image in
the same format we use elsewhere, so the browser knows when to use the
cached image or to make a new request to the server.

Edited by Tim to preserve/fix sort orders in some tests, and update
zulip_feature_level.

Fixes: #14290
2020-05-12 11:09:01 -07:00
Steve Howell 9137726e38 bots: Remove `owner` (email) from bot-related payloads.
We remove the `owner` field from `page_params/realm_bots`
and bot-related events.

In the recent commit 155f6da8ba
we added `owner_id`, which we now use everywhere we need
bot owners for.

We also bump the `API_FEATURE_LEVEL` to 5 here.  We
had already documented this in the prior commit to
add `owner_id`.

Note that we don't have to worry about mobile/ZT clients
here--we only deal with bot data in the webapp.
2020-05-12 09:48:37 -07:00
Hemanth V. Alluri cd69da26dc webhooks/github: Ignore the label event. 2020-05-12 09:32:17 -07:00
Hemanth V. Alluri 4dd957faa2 webhooks/github: Add support for pull request ready for review.
GitHub supports opening a draft/WIP pull request and then marking it
as ready for review later on. This PR supports the ready_for_review
action for pull_request events.

Signed-off-by: Hemanth V. Alluri <hdrive1999@gmail.com>
2020-05-12 09:32:17 -07:00
Rohitt Vashishtha a9b434b354 night-mode: Update CSS for navbar separators. 2020-05-12 00:16:09 -07:00
Tim Abbott 93a303db97 recent_senders: Use better variable names and comments.
This makes the data structures in use here more readable.
2020-05-12 00:15:26 -07:00
Aman Agrawal 5443b2f635 recent_senders: Update data structures for stream/topic edits.
* Remove old topic and reprocess both old and new topic to ensure
that we are correctly storing the last_msg_id of users in the
topic. Also, Handle topic's stream (& topic) edit updates.
* Add function to get all messages in a topic in message_utils.js.
* Send topic edit event to recent_senders.
* Add func get sorted list of recent_senders to topic.
The function will be useful to handle topic edits in Recent Topic UI.
2020-05-12 00:15:26 -07:00
Tim Abbott b3c5f2c13e puppet: Remove check_postgres_replication_lag hostname hardcoding.
Since this runs on the Nagios server, which already has the relevant
hostnames defined in zulip.conf, we can just read it from there.
2020-05-11 23:42:36 -07:00