Building Course Assist Part 14: Adding timestamps to conversations and creating a professional business email
With the launch of Course Assist nearly approaching I've spent the last couple of days adding some final touches and testing the app to make sure everything is working the way it's supposed to. Some of the latest tasks I did as stated in the title are adding timestamps to the conversation model in the database and creating a professional business email for Course Assist. In this article, I'll walk you through how I went about doing this. Let's get straight to it🏃♂️
Adding timestamps to conversations⏱️
As I was going through the Course Assist Expert app the other day I noticed the conversations in the conversation list were not sorted but arranged randomly🙄. Now this isn't supposed to be the case because users want to see messages sorted by time. Meaning if a new message is added to a conversation the most recent conversation is supposed to appear at the top of the list. I then took a closer look and noticed that it was like this because the conversation model didn't have timestamps. What's supposed to happen is every time a conversation object is altered its timestamp is supposed to be updated to the time at which the edit was made😅.
To fix this I first added a timestamp field to the conversation model in the database (it's a Django backend). The timestamp was of "DateTime" field and I added "auto_now = True" argument to the function to update the timestamp every time the object is edited. I then added the field to serializers and added filter backends and ordering fields so that the API sorts the conversation list based on timestamps.
Creating a professional business email📧
Professional business emails are important to give your business a nice professional touch. Course Assist is no exception to this, the email I set up for it is info@course-assist.com just something generic that can be used for sending the login verification code and also for users with queries. Feel free to drop me an email if you've got a question about Course Assist😄.
I used Godaddy for this, it allows you to create professional emails using your domain. Since I already have a domain hosted by them I figured it'll be easy to also set up my email with them. It costs about $6 and is charged monthly though they do offer a yearly charge if that is what you want. The setup process for this email wasn't the most straightforward though😬, it got a little complicated because my DNS records are hosted on Digital Oceans servers and not GoDaddy servers. Because of this, I had to add some DNS records such as CNAME, MX and TCT to my Digital Ocean account. Fortunately for me, GoDaddy provides clear instructions for doing this which I followed. Once everything was added I had to wait a couple of minutes for everything to be configured and when it was done I received an email and sms telling me that my email was now ready for use.
With these crucial steps complete both Course Assist apps are now ready for public use🥳. The only remaining tasks that are related to the development of the mobile apps are testing them on iOS (because I've been running them on Android all along🙄) and doing one last system test with a deployed backend just to make sure everything is okay (you can never be too sure🙂). Stay tuned to the blog to see what will come next. Thanks for reading and see you in the next🙏.