kulttuuri / DiscordNotifications

Integrate Discord with Mediawiki. Sends notifications into your Discord room when certain actions are being performed in your wiki (for example when article is being edited, new article was added...)
MIT License
38 stars 20 forks source link

"edit" icon missing #63

Open burner1024 opened 4 years ago

burner1024 commented 4 years ago

V1.12, for some reason pretty "edit" icon is missing: Captura de pantalla de 2020-03-10 04-08-04 What should I check?

kulttuuri commented 4 years ago

Those are actually emojis, pencil icon is: 📝 :pencil: .

I think that you are missing that emoji in your operating system (what OS are you using or was this on mobile?) or you have somehow disabled emojis in Discord or something like this. Does others see the emoji or are you the only one missing it?

burner1024 commented 4 years ago

I think that you are missing that emoji in your operating system (what OS are you using or was this on mobile?)

Linux.

Does others see the emoji or are you the only one missing it?

Uhm, I don't know.

If I just copy/paste :pencil: into Discord message window, it displays properly: Captura de pantalla de 2020-05-08 15-01-39

kulttuuri commented 4 years ago

Interesting. Is it linux desktop version, that could have bug with rendering emojis coming from webhooks... Can you check with mobile or web version of Discord to verify this?

burner1024 commented 4 years ago

It's exactly the same in web version (Firefox), icon missing.

kulttuuri commented 4 years ago

Hmm... 🤔 Not sure what is causing that then...

kulttuuri commented 4 years ago

Btw did that work before or has it always been missing?

burner1024 commented 4 years ago

Emojis always worked, the one from wiki hook - never. Is there a way to log/see the payload that's being sent to Discord?

kulttuuri commented 4 years ago

Yeah, I was also wondering if the message sent from your MediaWiki server is being encoded in some weird format. To log the payload to PHP error log file, you can:

burner1024 commented 4 years ago

OK, so it's what's being sent: [08-May-2020 08:52:33 UTC] {"embeds": [{ "color" : "2993970" ,"description" : "???? [Magus](https:// PHP user locale is UTF8, db is in utf8mb4, everything is utf8 in pretty much any place I can think of.

What else can I check?

kulttuuri commented 4 years ago

Ah! So that is the issue. What method do you use to send the data, cURL? Do you use Apache? Latest PHP 7 version?

burner1024 commented 4 years ago

Yes, curl. Nginx+php-fpm v7.2

kulttuuri commented 4 years ago

If you open the language file i8n/en.json of the extension in your mediawiki installation, do you see messed up emojis or proper emojis? Maybe that file got messed up at some point or has wrong character encoding?

This is what it should look like: https://github.com/kulttuuri/DiscordNotifications/blob/master/i18n/en.json

burner1024 commented 4 years ago

It does look good Captura de pantalla de 2020-05-08 16-44-43

$ file extensions/DiscordNotifications/i18n/en.json 
extensions/DiscordNotifications/i18n/en.json: UTF-8 Unicode text
kulttuuri commented 4 years ago

I am not sure what the issue might be then... 🤔