emoji: Remove setting for deprecated Google blobs emoji set.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2025-10-01 12:20:38 -07:00
committed by Tim Abbott
parent bbca79d92e
commit b742ab18f9
6 changed files with 44 additions and 17 deletions

View File

@@ -9,7 +9,6 @@ Currently, Zulip supports these four display formats for emoji:
- Google
- Twitter
- Plain text
- Google blob (deprecated)
## Emoji codes

View File

@@ -151,16 +151,9 @@ you send. Zulip emoji are compatible with screen readers and other accessibility
<NavigationSteps target="settings/preferences" />
1. Under **Emoji**, select **Google**,
**Twitter**, **Plain text**, or **Google blobs** for the emoji theme.
**Twitter**, or **Plain text** for the emoji theme.
</FlattenedSteps>
<ZulipNote>
**Google blobs** is an old style of Google emoji that has not been maintained
by Google since 2017, when they switched to a more modern style. Zulip allows
you to still use blob emoji, but any new emoji that have been released since
2017 will be displayed in the modern **Google** style.
</ZulipNote>
## Related articles
* [Add custom emoji](/help/custom-emoji)

View File

@@ -0,0 +1,41 @@
# Generated by Django 5.2.6 on 2025-10-01 18:23
from django.db import migrations, models
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
from django.db.migrations.state import StateApps
def remove_google_blob(apps: StateApps, schema_editor: BaseDatabaseSchemaEditor) -> None:
UserProfile = apps.get_model("zerver", "UserProfile")
RealmUserDefault = apps.get_model("zerver", "RealmUserDefault")
UserProfile.objects.filter(emojiset="google-blob").update(emojiset="google")
RealmUserDefault.objects.filter(emojiset="google-blob").update(emojiset="google")
class Migration(migrations.Migration):
dependencies = [
("zerver", "0752_remove_stream_is_in_zephyr_realm"),
]
operations = [
migrations.RunPython(remove_google_blob, elidable=True),
migrations.AlterField(
model_name="realmuserdefault",
name="emojiset",
field=models.CharField(
choices=[("google", "Google"), ("twitter", "Twitter"), ("text", "Plain text")],
default="google",
max_length=20,
),
),
migrations.AlterField(
model_name="userprofile",
name="emojiset",
field=models.CharField(
choices=[("google", "Google"), ("twitter", "Twitter"), ("text", "Plain text")],
default="google",
max_length=20,
),
),
]

View File

@@ -154,14 +154,12 @@ class UserBaseSettings(models.Model):
# Emoji sets
GOOGLE_EMOJISET = "google"
GOOGLE_BLOB_EMOJISET = "google-blob"
TEXT_EMOJISET = "text"
TWITTER_EMOJISET = "twitter"
EMOJISET_CHOICES = (
(GOOGLE_EMOJISET, "Google"),
(TWITTER_EMOJISET, "Twitter"),
(TEXT_EMOJISET, "Plain text"),
(GOOGLE_BLOB_EMOJISET, "Google blobs"),
)
emojiset = models.CharField(default=GOOGLE_EMOJISET, choices=EMOJISET_CHOICES, max_length=20)

View File

@@ -14125,7 +14125,6 @@ paths:
- "google" - Google
- "twitter" - Twitter
- "text" - Plain text
- "google-blob" - Google blobs
type: string
example: "google"
demote_inactive_streams:
@@ -17802,7 +17801,6 @@ paths:
used to display emoji to the user everywhere they appear in the UI.
- "google" - Google modern
- "google-blob" - Google classic
- "twitter" - Twitter
- "text" - Plain text
demote_inactive_streams:
@@ -20712,7 +20710,6 @@ paths:
used to display emoji to the user everywhere they appear in the UI.
- "google" - Google modern
- "google-blob" - Google classic
- "twitter" - Twitter
- "text" - Plain text
demote_inactive_streams:
@@ -21963,7 +21960,6 @@ paths:
used to display emoji to the user everywhere they appear in the UI.
- "google" - Google modern
- "google-blob" - Google classic
- "twitter" - Twitter
- "text" - Plain text

View File

@@ -512,8 +512,8 @@ class ChangeSettingsTest(ZulipTestCase):
def test_emojiset(self) -> None:
"""Test banned emoji sets are not accepted."""
banned_emojisets = ["apple", "emojione"]
valid_emojisets = ["google", "google-blob", "text", "twitter"]
banned_emojisets = ["apple", "emojione", "google-blob"]
valid_emojisets = ["google", "text", "twitter"]
for emojiset in banned_emojisets:
result = self.do_change_emojiset(emojiset)