mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
realm-emoji: Add realm emoji uploading instead url providing.
- Add file_name field to `RealmEmoji` model and migration. - Add emoji upload supporting to Upload backends. - Add uploaded file processing to emoji views. - Use emoji source url as based for display url. - Change emoji form for image uploading. - Fix back-end tests. - Fix front-end tests. - Add tests for emoji uploading. Fixes #1134
This commit is contained in:
@@ -3095,9 +3095,9 @@ def notify_realm_emoji(realm):
|
||||
realm_emoji=realm.get_emoji())
|
||||
send_event(event, active_user_ids(realm))
|
||||
|
||||
def check_add_realm_emoji(realm, name, img_url, author=None):
|
||||
def check_add_realm_emoji(realm, name, file_name, author=None):
|
||||
# type: (Realm, Text, Text, Optional[UserProfile]) -> None
|
||||
emoji = RealmEmoji(realm=realm, name=name, img_url=img_url, author=author)
|
||||
emoji = RealmEmoji(realm=realm, name=name, file_name=file_name, author=author)
|
||||
emoji.full_clean()
|
||||
emoji.save()
|
||||
notify_realm_emoji(realm)
|
||||
|
||||
Reference in New Issue
Block a user