Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emoji Support #408

Closed
alexpcooper opened this issue Apr 18, 2021 · 2 comments
Closed

Emoji Support #408

alexpcooper opened this issue Apr 18, 2021 · 2 comments
Labels
question Further information is requested

Comments

@alexpcooper
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Not related to a problem but, as a feature request, support for emoji characters would be really useful.

Messages involving emojis currently cause a 500 error from the server. if you use unicode (eg. "\U0001f47f", "U+1F600", etc.), HTML emoji (eg. "😀" - not a surprise as the documentation said it wouldn't work, but I thought I'd try it anyway) then the values are printed our directly in the notification as they're sent. This is whether you use plain text or markdown.

Messages being sent via the Android app also fail when you include an emoji character and again print out the unicode / HTML version when you use those.

As far as I've so far been able to ascertain, there's no way to push an emoji into either the title or body of a notification.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Just some sort of support so that notifications can include them. The GitHub Flavored Markdown doesn't appear to offer it. I don't know what would be involved in providing support.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

As described above.

Additional context
Add any other context or screenshots about the feature request here.

@alexpcooper alexpcooper added the a:feature New feature or request label Apr 18, 2021
@jmattheis
Copy link
Member

You can paste emoji directly into the message body.

jm@dyne ~/src/playground/gotify λ cat msg.json
{
    "message": "Hello 😀"
}
jm@dyne ~/src/playground/gotify λ cat msg.json| http POST ":8080/message?token=AjqsNwNNor7kw9N"
{
    "appid": 1,
    "date": "2021-04-19T17:17:15.045747318+02:00",
    "id": 49,
    "message": "Hello 😀",
    "priority": 0,
    "title": "aoeu"
}

image

@jmattheis jmattheis added question Further information is requested and removed a:feature New feature or request labels Apr 19, 2021
@alexpcooper
Copy link
Author

Ah yeah, thanks @jmattheis

I have a MySQL setup and I had to set the config in the yml file from...
connection: root:DBPASS@tcp(127.0.0.1)/gotifydb?charset=utf8&parseTime=True&loc=Local
... to ...
connection: root:DBPASS@tcp(127.0.0.1)/gotifydb?charset=utf8mb4&parseTime=True&loc=Local
(utf8mb4 instead of utf8)

Now it's happy to pass emoji in via the connection (for anyone else who comes across this I also altered the Collation on the table / message field to utf8mb4_unicode_ci but as I did that first I don't know if that's also a part of the fix).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

2 participants