Commit Graph

9 Commits (911fe9e9f85b8298d482516f24970c98a8e0c386)

Author SHA1 Message Date
Michael Manganiello 49bd6129ff Convert mailer_emoji JSON file to map
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)
```
2023-05-13 11:43:47 -03:00
binwiederhier 90db1283dd Allow SMTP servers without auth 2023-03-02 20:25:13 -05:00
binwiederhier 76d46ec646 Minor tweaks 2023-02-15 10:55:01 -05:00
binwiederhier 7cc8c81bd8 Continued logging work 2023-02-05 23:34:27 -05:00
binwiederhier a6641980c2 WIP: Logging 2023-02-03 22:21:50 -05:00
Karmanyaah Malhotra c2382d29a1 refactor visitor IPs and allow exempting IP Ranges
Use netip.Addr instead of storing addresses as strings. This requires
conversions at the database level and in tests, but is more memory
efficient otherwise, and facilitates the following.

Parse rate limit exemptions as netip.Prefix. This allows storing IP
ranges in the exemption list. Regular IP addresses (entered explicitly
or resolved from hostnames) are IPV4/32, denoting a range of one
address.
2022-10-05 16:04:42 -05:00
Philipp Heckel bddde5c637 Bump Go version, Generics whoooo 2022-10-01 15:50:48 -04:00
Philipp Heckel 7845eb0124 So much logging 2022-06-01 23:24:44 -04:00
Philipp Heckel 7eaa92cb20 WIP 2021-12-27 16:39:28 +01:00