rht
995b300840
zilencer: Remove unused imports (F401).
2017-11-07 16:37:01 -08:00
rht
ccf2792c1c
refactor: Remove six.moves.configparser import.
2017-11-07 10:51:44 -08:00
rht
ec5120e807
refactor: Remove six.moves.zip import.
2017-11-07 10:46:42 -08:00
rht
0e71b243ce
zilencer: Remove inheritance from object.
2017-11-06 08:53:48 -08:00
neiljp (Neil Pilgrim)
6c995db231
mypy: Use Iterator[Any] as return type of queryset_iterator.
2017-11-04 19:47:45 -07:00
Harshit Bansal
233595b2f7
actions.py: Rename `do_add_reaction()` to `do_add_reaction_legacy()`.
2017-10-31 15:42:35 -07:00
Tim Abbott
1cd017288d
views: Fix imports of REQ/has_request_variables from the wrong place.
...
These were never in zerver/decorator.py, and so it makes sense to
import them zerver/lib/request.py, mostly for ease of finding things.
2017-10-27 15:07:31 -07:00
Vishnu Ks
1d94119d31
actions: Call send_initial_pms from process_new_human_user.
2017-10-25 14:14:59 -07:00
Tim Abbott
735b49e505
zilencer: Fix uniqueness rules for RemotePushDeviceToken.
...
Since a user could use the same installation of the Zulip mobile app
with multiple Zulip servers, correct behavior is to allow reusing the
same token with multiple Zulip servers in the RemotePushDeviceToken
model.
2017-10-18 21:24:06 -07:00
rht
691598a88b
py3: Remove "from six.moves import range".
...
This is no longer required, since in Python 3, this is what the range
built-in does.
2017-10-17 23:28:14 -07:00
rht
2f3ae84e5a
py3: Remove all `__future__ import division`.
2017-10-17 23:09:12 -07:00
rht
b2ad8fd747
py3: Remove all `from __future__ import unicode_literals`.
...
This was mostly used in migrations, so it's a pretty safe change.
2017-10-17 23:07:42 -07:00
Tim Abbott
66a3f514d4
zilencer: Remove long-obsolete Deployment model.
...
This was a precursor to RemoteZulipServer, which is no longer used for
anything, and was cluttering the codebase.
2017-10-11 23:48:01 -07:00
Tim Abbott
51006f4a43
populate_db: Create bots before sending messages.
...
Apparently, the order we'd just created in
cbbdd539f4
broke populate_db; this is a
better and more sustainable fix to the overall problem.
2017-10-11 23:27:00 -07:00
Tim Abbott
cbbdd539f4
populate_db: Fix creating welcome-bot at the wrong place.
...
While it might be useful to have created welcome-bot earlier in a
certain sense, it's definitely not a good idea in this populate_db
implementation, because doing so threw off the random initial
assignment of users to streams and thus broke the casper tests.
2017-10-11 22:17:09 -07:00
derAnfaenger
5ddc336844
tests: Add welcome bot as user.
2017-10-11 20:45:42 -07:00
Brock Whittaker
835b6c7059
components: Make checkboxes darker.
...
This makes the standard checkboxes 7% darker and makes the disabled
ones about 12% darker + 7% darker than they were before, to
increase visibility.
Fixes : #6331 .
2017-10-11 13:15:44 -07:00
rht
8d289b8228
zilencer: Remove absolute_import.
2017-09-27 20:20:07 -07:00
rht
ed9b3ca440
zilencer: Remove import print_function.
2017-09-27 18:06:47 -07:00
Robert Hönig
c77b245944
backend tests: Add 'AARON' as bot owner of OUTGOING_WEBHOOK_BOT.
2017-09-26 16:11:27 -07:00
Rishi Gupta
0727f045f5
zilencer: Add management commands to create new dev users and realms.
2017-09-22 06:35:43 -07:00
Greg Price
613d093d7d
push notifs: Implement APNs with new API.
...
And it works!
A couple of things still to do:
* When a device token is no longer active, we'll get HTTP status 410.
We should then remove the token from the database so we don't keep
trying to push to it. This is fairly urgent.
* The library we're using has a nice asynchronous API, but this
version doesn't use it. This is OK now, but async will be
essential at scale.
2017-08-26 14:16:05 -07:00
Rishi Gupta
b32fe9f2a0
features: Update screenshot and add tool to generate.
...
This adds a new management command that should make generating or
updating screenshots a bit easier in the future.
2017-08-22 11:32:22 -07:00
Tim Abbott
d7f8781b06
populate_db: Remove unnecessary print statement.
2017-08-15 12:55:56 -07:00
Tim Abbott
2858c13513
populate_db: Use caching helpers to get users.
2017-08-15 12:55:00 -07:00
Tim Abbott
27b79e7189
populate_db: Fix duplicate test data when run multithreaded.
...
The previous implementation resulted in each of the 10 threads using
the same random seed and thus same messages.
Fixes #6028 .
2017-08-05 11:22:11 -07:00
Darren Fix
69767a43cb
Create complex sample messages for dev VM.
...
Create a generator script to pull lines from a play, enhancing
random lines with emoji, Markdown and other flair.
With numerous contributions from Rein Zustand and Tim Abbott to finish
the project.
Fixes : #1666 .
2017-08-01 20:54:39 -07:00
Aditya Bansal
9e372c465c
populate_db: Set pointer as message_id of last user sent message.
2017-07-28 11:57:52 -07:00
Harshit Bansal
eeb25b6b4b
populate_db: Add a test realm emoji while populating databases.
...
Add `green_tick` realm emoji which can be used while performing tests.
2017-07-27 18:57:06 +00:00
Vishnu Ks
7eaec543f1
zilencer: Use get_user in populate_db.py.
2017-07-18 17:14:05 -07:00
Vishnu Ks
df664db7b4
zilencer: Remove unused imports from populate_db.py.
2017-07-18 17:14:05 -07:00
Vishnu Ks
9a44794d14
zilencer: Eliminate get_user_profile_by_email from sync_api_key.
2017-07-18 17:14:05 -07:00
Vishnu Ks
b0b809b195
zilencer: Eliminate get_user_profile_by_email from print_initial_password.
2017-07-18 17:14:05 -07:00
Vishnu Ks
754db8ec9f
zilencer: Eliminate get_user_profile_by_email from profile_request.
2017-07-18 17:14:05 -07:00
Aditya Bansal
f2d6194ae1
actions: Start logging subscription activities in RealmAuditLog.
2017-07-17 17:23:41 -07:00
Aditya Bansal
0c4165a5bd
pep8: Add compliance with rule E261 to populate_db.py.
2017-07-11 11:56:50 -07:00
Vaida
d5517bae36
Delete the old zulip.com "referrals" system.
...
This system hasn't been in active use for several years, and had some
problems with it's design. So it makes sense to just remove it to declutter
the codebase.
Fixes #5655 .
2017-07-07 14:59:18 -07:00
Tim Abbott
d6e0960ca2
push_notifications: Fix mypy annotation logic around push tokens.
...
I'm not 100% confident this is long-term correct, but at least it's
consistent.
2017-07-07 10:54:37 -07:00
Tim Abbott
0606ba88df
push_notifications: Verify that token types are valid.
...
We only have two types of push notification tokens, so we should
validate that in the bouncer code path.
2017-07-07 10:28:36 -07:00
Tim Abbott
40425044c4
push_notifications: Validate APNS token format in bouncer.
...
This prevents a buggy old Zulip server from forwarding invalid-format
push notification tokens to the push notification bouncer service.
As part of this change, we switch the token from Text to str to match
the rest of the code path.
2017-07-07 10:28:36 -07:00
Rishi Gupta
36cd122905
models: Change default org_type to CORPORATE.
...
Once we implement org_type-specific features, it'll be easy to change a
corporate realm to a community realm, but hard to go the other way. The main
difference (the main thing that makes migrating from a community realm to a
corporate realm hard) is that you'd have to make everyone sign another terms
of service.
2017-06-29 15:14:58 -07:00
Umair Khan
323fbdefa8
zilencer: Add on_delete in foreign keys.
...
on_delete will be a required arg for ForeignKey in Django 2.0. Set it
to models.CASCADE on models and in existing migrations if you want to
maintain the current default behavior.
See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
2017-06-13 15:14:00 -07:00
Aditya Bansal
bcc247a5b1
pep8: Add compliance with rule E261 zilencer/urls.py.
2017-05-31 17:07:15 -07:00
vaibhav
9cf9837f12
webhooks: Add outgoing webhook bot user to development database.
2017-05-29 16:01:23 -07:00
Christian Hudon
c80e6edb4e
mypy: Declare models with null=True Optional.
2017-05-23 14:36:40 -07:00
Tim Abbott
0b2388bda9
push_notifications: Remove DeviceTokenType logic.
...
The syntax wasn't valid on Python 3.5, and the new code is somewhat
more readable anyway.
2017-05-16 12:26:55 -07:00
Umair Khan
c4e5b75ead
push_notification: Push data from Zilencer.
2017-05-16 12:26:55 -07:00
Umair Khan
4a864c7515
push_notification: Send data to notification bouncer.
2017-05-16 12:26:55 -07:00
Tim Abbott
c7d2caab6e
zilencer: Add auto_now to RemoteZulipServer.last_updated.
...
This should simplify the logic needed to create one of these.
2017-05-15 17:04:33 -07:00
Umair Khan
e649c05aed
views.py: Create validator for remote server.
2017-05-11 12:04:16 -07:00