mirror of
https://github.com/binwiederhier/ntfy.git
synced 2024-08-21 10:43:49 +02:00
![]() This fixes a pending TODO comment regarding inefficient tags to emojis mapping, by requiring a full scan over emoji aliases to determine matches. Instead, now the JSON file is a map, with aliases as keys, and emojis as values. The script to convert the file with Python was: ```python import json with open("./mailer_emoji.json", "r", encoding="utf-8") as f: content = json.load(f) emoji_map = {} for emoji in content: for alias in emoji["aliases"]: if alias in emoji_map: print("WARNING: Duplicate alias:", alias) continue emoji_map[alias] = str(emoji["emoji"]) sorted_emoji_map = {k: emoji_map[k] for k in sorted(emoji_map)} with open("./mailer_emoji_map.json", "w", encoding="utf-8") as f: json.dump(sorted_emoji_map, f, indent=4, ensure_ascii=False) ``` |
||
---|---|---|
.. | ||
actions.go | ||
actions_test.go | ||
config.go | ||
config_test.go | ||
errors.go | ||
file_cache.go | ||
file_cache_test.go | ||
log.go | ||
mailer_emoji_map.json | ||
message_cache.go | ||
message_cache_test.go | ||
ntfy.service | ||
server.go | ||
server.yml | ||
server_account.go | ||
server_account_test.go | ||
server_firebase.go | ||
server_firebase_test.go | ||
server_manager.go | ||
server_manager_test.go | ||
server_matrix.go | ||
server_matrix_test.go | ||
server_metrics.go | ||
server_middleware.go | ||
server_payments.go | ||
server_payments_test.go | ||
server_test.go | ||
smtp_sender.go | ||
smtp_sender_test.go | ||
smtp_server.go | ||
smtp_server_test.go | ||
topic.go | ||
topic_test.go | ||
types.go | ||
util.go | ||
util_test.go | ||
visitor.go |