I want to encourage my users to upload an avatar via api.
How can I know a user is using default avatar in discourse? because I don’t want to warn users that already have gravatars or their custom avatars set.
I don’t know if its a good solution, but my solution for now is to look for gravatar_avatar_upload_id and custom_avatar_upload_id in /users/{username}.json and to see if they are both set to null.
I think it is the correct solution for you. For my knowledge only three types of avatars are there in Discourse (letter, gravatar and custom avatars). So it must work.
Yes I know. But I have implemented discourse in my application and users mostly post there. So i don’t know If this JIT message could be get with an api call. If it could be, I can call it when users perform some actions inside the application. But if it couldn’t be called with api call, I need to write a custom code for it.
These education messages are associated with the composer. I don’t know the exact endpoint, but I’m pretty sure you can get them via the API since it’s working in Discourse
Thank you very much. But how I can actually use it?
For example when user write their first topic in my app, I want to call this JIT and show the message.