Commit Graph

25206 Commits

Author SHA1 Message Date
Tim Abbott 6744938b6d bugdown: Simplify implementation for target_blank.
The previous version not using startswith() was harder to read.
2018-04-02 10:30:50 -07:00
Tim Abbott 6055a7bceb bugdown: Clean up rewrite_if_relative_link.
This implementation is more obviously correct, and may fix a corner
case where a `/` is missing after the realm URI.
2018-04-02 10:29:32 -07:00
Tim Abbott b58cd46e48 profile: Fix field types on the frontend. 2018-04-02 10:25:37 -07:00
Umair Khan e48f8bdafd check_short_string: Use check_capped_string for impl. 2018-04-02 09:51:09 -07:00
Umair Khan 7fdf043564 profile: Set max length for long text to 500. 2018-04-02 09:51:09 -07:00
Umair Khan 1d4b74482c check_short_string: Change max_length to 50. 2018-04-02 09:51:09 -07:00
Umair Khan c30a282dd9 profile: Remove integer and float fields. 2018-04-02 09:46:21 -07:00
Vishnu Ks c473ce0919 requirements: Upgrade Django to 1.11.11. 2018-04-02 09:29:12 -07:00
Vishnu Ks bdf6e08fc0 requirements: Upgrade python-twitter to 3.4.1. 2018-04-02 09:29:12 -07:00
Rhea Parekh 1bba6cc4ce slack importer: Support custom emoji reactions. 2018-04-01 23:24:35 -07:00
Rhea Parekh 2c116e46ce slack importer: Get custom emojis. 2018-04-01 23:24:35 -07:00
Rhea Parekh 00c1f25b58 import script: Support custom emojis.
'processing_emojis' check is added in the 'import_uploads'
function, so that the emoji files present in the to be imported
data file can be uploaded.

The procedure of saving emoji files in slack importer is same as
saving attachments and avatars, and the import has the similar
procedure too.
2018-04-01 23:24:35 -07:00
Rhea Parekh c650b8fa3e slack importer: Add zerver_realmemoji. 2018-04-01 23:24:35 -07:00
Rhea Parekh b133d175a7 slack importer: Change 'get_user_data' function implementation.
Change 'get_user_data' function to a more general function
to get data from the slack api using legacy tokens.

Also, change the error handling as upon invalid token,
the response is 200, but the response has an error
field in it.

For eg. Go to the following link with invalid token:
https://slack.com/api/emoji.list?token=xoxp-249056023425
2018-04-01 23:24:35 -07:00
Rhea Parekh 220ad6a386 slack importer: Map standard reactions.
As mentioned in
https://get.slack.help/hc/en-us/articles/202931348-Use-emoji-and-emoticons,
slack supports the standard emoji codes
(https://www.webpagefx.com/tools/emoji-cheat-sheet/)
and majority of them are already supported in Zulip.
2018-04-01 23:24:35 -07:00
Rhea Parekh 6f867fee40 import script: Support import of reactions. 2018-04-01 23:24:33 -07:00
Rhea Parekh 8a028142d8 slack importer: Remove id allocation function and its implementation.
Remove allocation ID function from slack import script. All the IDs
count will start from 0. Hence the ID List returned
by the allocation function is of no use, and we remove its implementation.
(example: get_total_messages_and_attachments function is of no use anymore,
hence we remove it)
2018-04-01 23:10:55 -07:00
Rhea Parekh d147bd25d0 import script: Change file path of the upload in the import script.
In importing avatars, we use the implementation where the 'avatar_path'
is seperately calculated using realm and user ID and then the content
of the path provided in the avatar's 'records.json' are copied to this
'avatar_path'.

Similary, here for the uploads, 's3_file_name' is seperately calculated
using the realm ID and uploaded file name and then the content of the
path provided in upload's 'records.json' are copied to this 's3_file_name'.
2018-04-01 23:04:14 -07:00
Rhea Parekh ff34d07fa0 import script: Add function to update model ids after allocation.
Add function 'update_model_ids' to remove repetitive code.
2018-04-01 22:29:23 -07:00
Rhea Parekh a2ecdeb28d import script: re_map minor foreign keys. 2018-04-01 22:29:23 -07:00
Rhea Parekh 078453554e import script: re_map Message foreign keys. 2018-04-01 22:29:23 -07:00
Rhea Parekh 93aabcb81c import script: re_map Subscription foreign keys. 2018-04-01 22:29:23 -07:00
Rhea Parekh 9ef7870c5a import script: re_map Recipient foreign keys. 2018-04-01 22:29:23 -07:00
Rhea Parekh 4537223ba7 import script: re_map UserProfile foreign keys. 2018-04-01 22:29:23 -07:00
Rhea Parekh 1314e7d247 import script: re_map Stream foreign keys.
'recipient_field' is added as a bool variable in the function
'update_id_map' to update the recipient foreign keys.

Recipient Foreign Key is equal to the UserProfile ID, if the
type is 1, and the same is equal to Stream ID, if the type is 2.
Hence a check is added in the 'update_id_map' field for this.
2018-04-01 22:29:23 -07:00
Rhea Parekh 8624ba4132 import script: re_map Realm foreign keys.
All the objects with realm ID as the foreign keys need to
be remapped with updated with the allocated ID.
Also the ID of the realm object itself is updated with the allocated
ID.
2018-04-01 22:29:23 -07:00
Rhea Parekh 2b0ee472af import script: Refactor re_map_foreign_keys.
The 'id_field' bool variable is added to the function just to check
if the field is the ID of that object, and not the foreign key relation.
For foreign key field names, a "_id" has to be added after the field name,
however we don't need that for the ID field of the object.
2018-04-01 22:29:23 -07:00
Rhea Parekh cd0871bae4 Import script: Add id allocation functions. 2018-04-01 22:29:23 -07:00
Shubham Padia 10115491a3 real-time sync: Server sends recipent data with delete_message event.
Fixes #8853.
In certain cases, the browser is not able to look up the message.
Include the recipient data for the message in the delete_message event,
so look up of those attributes by the browser isn't required.
2018-04-01 22:19:08 -07:00
Shubham Padia e1d9e3ae03 real-time sync: Use process_read_messages_event in delete_message event.
Replace mark_message_as_read with process_read_messages_event as the
latter function is only correct for marking a message as having been
read by this browser.
2018-04-01 22:17:18 -07:00
Tim Abbott a65f6288b6 docs: Fix a broken link to the Cloud9 documentation. 2018-04-01 22:13:38 -07:00
Puneeth Chaganti 986e55e5b0 docs: Move summer with Zulip doc from Dropbox paper to ReadTheDocs.
Originally authored mostly by Tim Abbott.
2018-04-01 22:11:45 -07:00
Balaji2198 15d42f86f1 left sidebar: Fix "Compose" in stream actions popover prefills topic.
Fixes #8824.
2018-04-01 16:24:15 -07:00
Tim Abbott 3cfc760506 deprecation: Add fallback for if local storage is not available.
This falls back to a persistent variable for situations where local
storage is not enabled on the system.
2018-04-01 16:19:47 -07:00
Anurag Sharma 1227857de6 hotkeys: Replace C with x for composing PM.
Pressing the 'x' key can now be used to compose a PM.
Pressing the 'C' key displays a modal that shows a deprecation notice.

Fixes #6548.
2018-04-01 16:13:05 -07:00
Tim Abbott af004fa6f5 rabbitmq: Connect to rabbitmq via 127.0.0.1 rather than localhost.
This should eliminate the occasional problems that some installations
have had with RabbitMQ trying to load-balance requests between
127.0.0.1 and ::1 (the ipv6 version of localhost).
2018-04-01 16:11:12 -07:00
Shubham Dhama ad066ca444 org settings: Use `get_property_value` to get property elem value. 2018-04-01 16:11:12 -07:00
Shubham Dhama 8d70e59ad0 org settings: Rename functions for more clarity. 2018-04-01 16:11:12 -07:00
Shubham Dhama 7fbf613f89 org settings: Unexport functions not used in other modules. 2018-04-01 16:11:12 -07:00
Marco Burstein 7def65d7a3 style: Give inputs with `type="number"` a dark background in night mode.
Fix #8905.
2018-04-01 15:14:42 -07:00
Vishnu Ks ca34b8e864 version: Bump version to facilitate py dependency upgrade. 2018-04-01 14:24:00 -07:00
Vishnu Ks 9e7a8d1603 requirements: Upgrade lxml to 4.2.1. 2018-04-01 14:24:00 -07:00
Vishnu Ks 03475362c4 requirements: Upgrade cryptography to 2.2.2. 2018-04-01 14:24:00 -07:00
Vishnu Ks 082f8bb682 requirements: Upgrade cffi to 1.11.5. 2018-04-01 14:24:00 -07:00
Vishnu Ks 47f79a0bf0 requirements: Upgrade stripe to 1.79.1. 2018-04-01 14:24:00 -07:00
Vishnu Ks 211826a0d8 requirements: Upgrade twilio to 6.11.0. 2018-04-01 14:24:00 -07:00
Vishnu Ks 94c107747f requirements: Upgrade SQLAlchemy to 1.2.6. 2018-04-01 14:24:00 -07:00
Vishnu Ks ab81d8361e requirements: Upgrade Sphinx to 1.7.2. 2018-04-01 14:24:00 -07:00
Vishnu Ks 0cba334b6c requirements: Upgrade setuptools to 39.0.1. 2018-04-01 14:24:00 -07:00
Vishnu Ks dda3aad198 requirements: Upgrade PyJWT to 1.6.1. 2018-04-01 14:23:55 -07:00