<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Muhammad Yusuf on Medium]]></title>
        <description><![CDATA[Stories by Muhammad Yusuf on Medium]]></description>
        <link>https://medium.com/@ruangchupa?source=rss-c7a11d3c2799------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Lb8_00mzl06uRjtv</url>
            <title>Stories by Muhammad Yusuf on Medium</title>
            <link>https://medium.com/@ruangchupa?source=rss-c7a11d3c2799------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 13:26:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ruangchupa/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Fork: Langkah Awal Sederhana untuk Mulai Kontribusi di Komunitas Open Source]]></title>
            <link>https://medium.com/evermos-tech/fork-langkah-awal-sederhana-untuk-mulai-kontribusi-di-komunitas-open-source-d75a077b3f6f?source=rss-c7a11d3c2799------2</link>
            <guid isPermaLink="false">https://medium.com/p/d75a077b3f6f</guid>
            <category><![CDATA[open-source-contribution]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programmer]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[open-source-communities]]></category>
            <dc:creator><![CDATA[Muhammad Yusuf]]></dc:creator>
            <pubDate>Tue, 24 Mar 2020 14:31:50 GMT</pubDate>
            <atom:updated>2020-03-24T14:31:50.045Z</atom:updated>
            <content:encoded><![CDATA[<p>Sebagai <em>developer</em>, keseharian kita tidak bisa lepas dari komunitas <em>open source</em>. Sehari-hari kita banyak memakai <em>library</em> tak berbayar yang dibuat atau dimaintain oleh komunitas<em> open source</em>. Jika kita menemukan <em>error</em> pada suatu <em>library </em>yang kita pakai, pastinya kita merasa kecewa karena <em>timeline</em> kerja kita jadi terganggu, dan kita melaporkan hal tersebut sebagai <strong><em>Issue</em></strong> di <em>library</em> tersebut.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RTJ4S9OwpoqXhIemsXAkHw.png" /><figcaption>Issue submitted!</figcaption></figure><p>Terkadang, <em>issue</em> yang kita buat tidak cepat ditanggapi oleh para <em>maintainer</em> <em>library</em> tersebut. Sehingga <em>timeline</em> pekerjaan kita menjadi benar-benar terganggu dan kita mulai mencari alternatif <em>library</em> lain. Padahal dipikir-pikir, para <em>maintainer-maintainer</em> itu tidak dibayar untuk me-<em>maintain</em> <em>library</em> tersebut.</p><p>Sambil menunggu <em>issue</em> kita ditanggapi, sebenarnya kita bisa melakukan <strong><em>Fork</em></strong> <em>library</em> tersebut, dan mencoba memperbaiki <em>library</em> tersebut khusus untuk kasus pekerjaan kita. Daripada menunggu orang lain yang belum tentu bisa me-<em>reproduce issue-</em>nya, lebih baik kita yang sudah dapat me-<em>reproduce issue</em>-nya mencoba memperbaikinya sendiri kan?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*58f6TAQeldCFjfzJp3IVqg.png" /><figcaption>Tombol Fork</figcaption></figure><p>Banyak keuntungan dengan menekan tombol <em>Fork</em> ini:</p><ul><li>Kita bisa memperbaiki sendiri dan tidak perlu menunggu orang lain memperbaiki</li><li><em>Library</em> yang sudah di-<em>fork</em> menjadi terserah kita, jika kita tidak bisa memperbaiki, mungkin kita bisa membuat sebuah <em>workaround</em> <em>fix</em> atau <em>hacky fix</em> di library tersebut.</li></ul><p>Seringkali saat melakukan <em>fork</em>, saya lebih fokus dalam membuat <em>workaround fix</em> sehingga pekerjaan saya bisa segera selesai. Nah, saat lagi santai di luar jam kerja, kita bisa membuka kembali kode kita dan mencari cara untuk membuat <em>fix</em> yang lebih global, yang bisa dipakai oleh semua orang bukan hanya untuk kita.</p><p>Jika kita berhasil membuat <em>fix</em> yang bisa dipakai oleh semua orang, kita bisa membuat <strong><em>Merge Request / Pull Request</em></strong><em> </em>balik ke repository library utamanya. Dengan begitu kita sudah berkontribusi di dunia <em>open source</em>. Perbaikan kita bisa menyelamatkan waktu orang-orang lain yang berpotensi memiliki masalah yang sama dengan kita di kemudian hari.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PFpmB8uSza_0dkBYUpyoKA.png" /><figcaption>Submit PR supaya fix kita bisa menyelamatkan hidup orang lain</figcaption></figure><p><em>Owner library</em> mungkin tidak langsung merespon <em>Pull Request</em> kita. Ingat, masing-masing punya kesibukan. Saat owner mereview <em>Pull Request</em> kita dan ada yang perlu kita perbaiki lagi pun, kita tidak diharuskan untuk langsung mengerjakan hasil reviewnya. Malah terkadang nanti ada orang lain yang ikut me-<em>review</em> dan memberi solusi.</p><p>Santai saja, toh untuk pekerjaan kita, kita sudah punya <em>workaround fix</em> nya di <em>library</em> hasil <em>fork</em> kita. Namun alangkah lebih baik jika kita segera menyelesaikan<em> Pull Request</em> kita supaya dapat segera di-<em>merge</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2nM2L_TaZ0B32lWrZd9rWQ.png" /><figcaption>PR review yang sudah 2 minggu belum sempat saya balas</figcaption></figure><p>Saat <em>owner</em> sudah puas dengan <em>fix</em> yang kita buat, <em>Pull Request</em> kita akan segera di-<em>merge</em>. Walau begitu, <em>owner library</em> mungkin tidak akan langsung membuat rilis baru yang berisi <em>fix</em> kita. Tak perlu resah menunggu rilis baru, kan kita bisa pakai <em>library</em> hasil <em>fork</em> kita. 🙂</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NAv-MVZXzgzNb7o9SzvwIw.png" /><figcaption>Yay! Merged!</figcaption></figure><p>Sampai akhirnya beberapa hari kemudian kita diberitahu bahwa <em>fix</em> kita sudah dimasukkan ke rilis terbaru dan kita bisa menggunakan <em>library</em> tersebut dari <em>repository</em> utamanya lagi. 🕺</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nR6JiqGLpYfwZ6dMHMskWw.png" /><figcaption>Terimakasih! Fix kamu sudah berhasil nge-fix problem kamu. :)</figcaption></figure><p>Yaay! Kita sudah berkontribusi di komunitas <em>open source</em>!</p><h3>My extra thoughts</h3><p>Artikel di atas sepertinya mudah namun tentunya berdampak pada <em>timeline</em> pekerjaan. Menurut saya, seharusnya<em> timeline pekerjaan </em>tidak dibuat mepet hanya karena sudah banyak <em>library</em> yang tersedia. Banyak hal yang bisa terjadi karena memakai <em>library open source</em>. Ingat, <em>library-library</em> itu dibuat oleh orang yang meluangkan waktu kerjanya demi berbagi dengan orang lain. Kita sebagai pemakai pun harusnya siap meluangkan waktu kerja juga jika terjadi masalah dengan <em>library</em> tersebut.</p><p>Dalam pekerjaan lebih baik <em>spare</em> waktu lebih. Terkadang kita dikejar-kejar <em>stakeholder</em> karena janji kita sendiri yang terlalu <em>over confidence</em>. Sehingga <em>stakeholder</em> terlanjur bilang ke stakeholder lainnya berdasarkan janji yang kita buat sendiri. Saat kita terlambat, <em>stakeholder</em> tersebut cerewet menagih-nagih karena dia juga ditagih-tagih oleh <em>stakeholder</em> lainnya. Awal masalahnya? Karena janji kita sendiri.</p><p>Dari seorang rekan yang saya kagumi, saya mendapat sebuah konsep perbedaan antara junior dan senior dalam menaksir waktu.</p><p>Kita ambil contoh dalam sebuah pekerjaan yang bisa selesai 5 hari:</p><ul><li><strong>Junior</strong>: <em>Over confidence</em>. Berpikir jangka pendek. Berani berkata 3 hari selesai. Kenyataan selesai 7 hari. Terlambat dari <em>deadline</em>.</li><li><strong>Medior</strong>: <em>Making problem more complex</em>. Terlalu berpikir jangka panjang. Berani berkata 7 hari selesai. Kenyataan 7 hari selesai. Sesuai <em>deadline</em>.</li><li><strong>Senior</strong>: Bisa menyeimbangkan antara berpikir pendek dan berpikir panjang. Berani berkata 7 hari selesai. Kenyataan 5 hari selesai. Lebih cepat dari <em>deadline</em>.</li></ul><p>Semoga artikel ini bermanfaat. Ingat, pakai <em>library open source</em> bukan untuk serba <em>instant</em>, tapi supaya tidak perlu <em>reinvent the wheel</em>. Jika ada yang ingin didiskusikan, silakan. 🙂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d75a077b3f6f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/evermos-tech/fork-langkah-awal-sederhana-untuk-mulai-kontribusi-di-komunitas-open-source-d75a077b3f6f">Fork: Langkah Awal Sederhana untuk Mulai Kontribusi di Komunitas Open Source</a> was originally published in <a href="https://medium.com/evermos-tech">evermos-tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Apple’s Different Perspective About Splash Screen]]></title>
            <link>https://medium.com/evermos-tech/apples-different-perspective-about-splash-screen-2dfd38f22590?source=rss-c7a11d3c2799------2</link>
            <guid isPermaLink="false">https://medium.com/p/2dfd38f22590</guid>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[ui-ux-design]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[splash-screen]]></category>
            <dc:creator><![CDATA[Muhammad Yusuf]]></dc:creator>
            <pubDate>Mon, 23 Mar 2020 14:56:46 GMT</pubDate>
            <atom:updated>2020-03-25T11:07:49.511Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever noticed that there’s no splash screen when you open Apple’s apps on your iPhone? Instead, you jump into the content of the app rightaway. Check the GIF below as I open Apple’s compass app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*avnkcXccx66r_hc1sVST-Q.gif" /><figcaption>Opening Compass app (in slow motion)</figcaption></figure><p>From GIF above, you can see that there’s no splash screen. We go to the content of the Compass app rightaway. Is it because the Compass app opened so fast so there’s no time for us to see the splash screen? Let’s try opening Apple’s Podcast app which is probably slower.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*oLmSACENvuAozq34_A2a7Q.gif" /><figcaption>Opening Podcast app (in slow motion)</figcaption></figure><p>This time, Apple’s Podcast app doesn’t open that fast. We have a delay before the app content has loaded and shown to the screen. But again, there’s no splash screen. At this point I think I can say that Apple don’t use splash screen.</p><p>I started to curious, why don’t Apple use splash screen. They provide LaunchScreen.storyboard for us when we develop iOS apps but seems they don’t use it for their own apps.</p><p>There are some apps in the AppStore with beautiful animated splash screen. You will get beautiful introduction animation on splash screen when you open apps like Twitter, Kitabisa, or Netflix. Why don’t Apple do that?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*km4lMue5dCemKumphyJkyw.gif" /><figcaption>Opening Twitter app (in real speed)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*8CVMd304QkV1zcSznOrXMw.gif" /><figcaption>Opening Kitabisa app (in real speed)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*uDgSaxiOyj7weKJLSZrO4A.gif" /><figcaption>Opening Netflix app (in real speed)</figcaption></figure><p>Why don’t Apple use splash screen? Actually, we can find the answer from their guidelines for launch screen:</p><p><a href="https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/launch-screen/">Launch Screen - Visual Design - iOS - Human Interface Guidelines - Apple Developer</a></p><blockquote>A launch screen appears instantly when your app starts up and is quickly replaced with the app’s first screen, giving the impression that your app is fast and responsive. <strong>The launch screen isn’t an opportunity for artistic expression</strong>. <strong>It’s solely intended to enhance the perception of your app as quick to launch and immediately ready for use</strong>.</blockquote><p>Brilliant I think. They say that splash screen isn’t a place to show off your artistic skill. Splash screen also is not a tool to slow down the launch speed of your app. It’s just a tool to make user perceive that our apps are quick to launch. They also give us some other guide for the splash screen experience in iOS apps:</p><ul><li><strong>Design a launch screen that’s nearly identical to the first screen of your app. </strong>People shouldn’t experience an unpleasant flash between the launch screen and the first screen of the app.</li><li><strong>Avoid including text on your launch screen.</strong></li><li><strong>Downplay launch.</strong> People value apps that let them quickly access content and perform tasks. Designing a launch screen that resembles an app’s interface creates the illusion that the app starts instantly.</li><li><strong>Don’t advertise.</strong> The launch screen isn’t a branding opportunity.</li></ul><p>So, my thought that Apple don’t use splash screen was wrong. They use splash screen on their apps, but in a nice experience so that we feel the app is instantly launch. Let’s see their splash screens by looking again at the way their apps launch:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*21JsNwqKEVo3ODdbiCcmow.gif" /><figcaption>They do have splash screen!</figcaption></figure><p>If you look carefully at Apple’s Compass app when it is launching, initially they show a blank compass circle without any text. It’s the launch screen! By showing that blank circle, user think that the app is instantly launch eventhough it’s still loading. Then couple miliseconds after, the app is loaded for real (it’s still fast though, even probably that splash screen is not necessary 😐).</p><p>And if you look carefully at Apple’s Podcast app, it has launch screen too. That blank UI with blank tab bar on the bottom is the launch screen. By doing so, user also think that the app instantly launch and loading.</p><p>So, is it bad to have animation on the splash screen? Or is it bad to show off some of our artistic tastes on the splash screen? Um, I don’t think so. After looking at some apps (almost none of them follow Apple guidelines about splash screen! 😁), I think I can have my own guidelines for splash screen, modified from Apple guidelines. Sorry Apple, this time I suppress a rebellion. 😬 So these are <strong>Ucup’s guidelines for iOS splash screen</strong>:</p><ul><li>If you’re able to make your app launches fast enough, follow Apple’s guideline for Launch Screen:<br><a href="https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/launch-screen/">https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/launch-screen/</a></li><li>If you need some moment to launch your app, it’s okay to have a rich splash screen, even the animated splash screen. As long as: <strong>1.</strong> <em>The animation duration doesn’t exceed the time required by your app to launch (user doesn’t have time to watch your 3 seconds animation!)</em>, <strong>2.</strong> <em>Avoid the unpleasant flash between the splash screen and the first screen of your app.</em></li></ul><h3>Which guidelines do I use for Evermos app?</h3><p>Of course my own guidelines! Haha.. Actually, I follow Apple’s guidelines.</p><p>As Evermos app launches fast enough, I follow my own guidelines which tell me to follow Apple’s guidelines if my app launches fast enough. 🤨</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/344/1*Ja490mwr3V_dfXF1CZNtSA.gif" /><figcaption>Launching Evermos app (in slow motion)</figcaption></figure><p>I use a blank screen with tab bar in the bottom. That tab bar actually imitates the actual tab bar inside Evermos app. By doing so, user will feel that the app instantly launches, as Apple suggested on their guideline. Here’s my LaunchScreen.storyboard screenshot:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J-BmfiLeNOtQIqsiH2Vorg.png" /><figcaption>Evermos LaunchScreen.storyboard</figcaption></figure><p>Really nice experience for the user I think. Well, that’s my thought about how launch screen should be in iOS environment. Thanks for reading. If you have your own thought, kindly share your thought, or even your own guideline. 😜</p><p>Anyway, I found another app that follows Apple’s guidelines for launch screen:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/1*0NeONH71sFml0C3IrzJ0Xw.gif" /><figcaption>Launching Airbnb app (in real speed)</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2dfd38f22590" width="1" height="1" alt=""><hr><p><a href="https://medium.com/evermos-tech/apples-different-perspective-about-splash-screen-2dfd38f22590">Apple’s Different Perspective About Splash Screen</a> was originally published in <a href="https://medium.com/evermos-tech">evermos-tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enable Chat Online Status within NiceDay Apps]]></title>
            <link>https://medium.com/niceday-dev/enable-chat-online-status-within-niceday-apps-8f67315c3b96?source=rss-c7a11d3c2799------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f67315c3b96</guid>
            <category><![CDATA[xmpp]]></category>
            <category><![CDATA[chat]]></category>
            <category><![CDATA[ejabberd]]></category>
            <category><![CDATA[online]]></category>
            <category><![CDATA[django]]></category>
            <dc:creator><![CDATA[Muhammad Yusuf]]></dc:creator>
            <pubDate>Mon, 01 Apr 2019 09:19:47 GMT</pubDate>
            <atom:updated>2020-03-24T02:25:24.124Z</atom:updated>
            <content:encoded><![CDATA[<h3>Chat Online Status in NiceDay</h3><p>I’d like to walk you through a feature development in our app NiceDay and I thought a nice example of a complex feature to share would be enabling chat <em>online status</em> in our product.</p><p>We want to leverage <em>online status</em> in our product to improve the user experience, namely when a client wants to interact with one of the professionals. The feature is easy to describe: it boils down to showing the online availability of a professional to the clients and vice versa, but implementing it with an external chat service (Ejabberd) and a custom Django backend for authentication can be quite tricky.</p><p>To enable this feature, we decided to leverage Roster items in the Ejabberd chat server which we can create directly from our Django backend when a user connection is created.</p><h3>Ejabberd API Configuration</h3><p>To enable this feature, we decided to leverage Ejabberd’s internal <a href="https://docs.ejabberd.im/developer/ejabberd-api/">REST API.</a> This allows us to control behaviour in the Ejabberd chat server using REST-based methods. To do this, we first created an internal admin user with permission restricted to only exactly the API calls we needed. We follow a strict privacy first development lifecycle, which means every API/admin gets access only on a need-to-know basis.</p><p>To enable Ejabberd APIs, in the <strong>listen</strong> section of the Ejabberd configuration, we set up <em>mod_http_api</em> to be accessible through <strong>/api</strong> endpoint, as you can see in the snippet below:</p><pre>listen:<br>  -<br>    port: 9999<br>    ip: &quot;::&quot;<br>    module: ejabberd_http<br>    request_handlers:<br>      &quot;/api&quot;: mod_http_api</pre><h3>Implementation in our Django Backend</h3><p>We implemented this as an external service within our Django backend which belongs to the Django package system. We wrapped this external service with helper functions so that the other apps could make use of this Ejabberd Django app when required for other features as well.</p><p>These are the standard payloads we used to interact with <em>add_rosteritem</em> and <em>delete_rosteritem</em> API calls that we required to create/remove rosters.</p><pre>POST /api/add_rosteritem<br>{<br>  &quot;localuser&quot;: &quot;user1&quot;,<br>  &quot;localserver&quot;: &quot;myserver.com&quot;,<br>  &quot;user&quot;: &quot;user2&quot;,<br>  &quot;server&quot;: &quot;myserver.com&quot;,<br>  &quot;nick&quot;: &quot;User 2&quot;,<br>  &quot;group&quot;: &quot;Friends&quot;,<br>  &quot;subs&quot;: &quot;both&quot;<br>}</pre><pre>HTTP/1.1 200 OK<br>&quot;&quot;</pre><pre>POST /api/delete_rosteritem<br>{<br>  &quot;localuser&quot;: &quot;user1&quot;,<br>  &quot;localserver&quot;: &quot;myserver.com&quot;,<br>  &quot;user&quot;: &quot;user2&quot;,<br>  &quot;server&quot;: &quot;myserver.com&quot;<br>}</pre><pre>HTTP/1.1 200 OK<br>&quot;&quot;</pre><p>When a client and a professional establish a connection with each other, a roster item is created which can be used by the app (using XMPP) to poll the presence of a user in the roster and make <em>online status</em> visible in the app and on the web portal. Ejabberd itself has a capability for handling duplication whenever someone performs multiple <strong>add_roster_item</strong> operation.</p><p>Roster Item is a basic functionality used by Presence API from Ejabberd for showing <em>online status</em> of a user of XMPP.</p><h3>SDK Specification</h3><p>Since we handle logic related to adding/removing Roster in the backend, responsibility of our SDK is only to provide the app and the web portal with the following capabilities:</p><ul><li>Sending availability status of the user.</li><li>Receiving availability statuses of the user’s contacts.</li></ul><p>We utilise the following availability status types supported by Ejabberd:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*Y5JNPbG_eQr2RkU4X2xddA.png" /></figure><h4>Send Initial Presence</h4><p>Send the following XML to the server to tell that the user is available:</p><pre>&lt;presence/&gt;</pre><p>By sending this, the user will be seen as <strong><em>online</em></strong> (or <strong>available)</strong> by their contacts.</p><p>Without sending this, the user won’t get an update on the availability status of their contact.</p><h4>Send Availability Status</h4><p>We utilise this when a user wants to be seen as <em>away</em>, <em>busy</em>, or <em>appear offline</em>. This will send the following XML to the server to tell the user availability status.</p><pre>&lt;presence <a href="/service/mailto:to=&#39;juliet@example.com">to=&#39;juliet@example.com</a>&#39;&gt;<br>    &lt;show&gt;away&lt;/show&gt;<br>    &lt;status&gt;Having a spot of tea&lt;/status&gt;<br>&lt;/presence&gt;</pre><h4>Subscribe to User Presence Change</h4><p>The subscription is responsible for a callback upon the arrival of a contact availability. XML of the following format will be received when a contact’s availability status has changed:</p><pre>&lt;presence from=&quot;alice@wonderland.lit/rabbithole&quot;<br>          to=&quot;sister@realworld.lit&quot;&gt;<br>&lt;/presence&gt;</pre><p>The SDK is also responsible for converting this XML to a TypeScript type that can be consumed by the app and the portal portal.</p><h3>Implementation in the NiceDay app</h3><p>We defined the behaviour of this feature in the app as described below:</p><ul><li>The app will send initial presence to broadcast its <em>available</em> status once it is connected to the chat server.</li><li>The server will automatically broadcast <em>unavailable</em> status once the app is no longer connected to the chat server (currently the app disconnects from the chat server once it gets sent to the background or killed by the user).</li></ul><p>When a contact is online, the app will show “<em>Online</em>” text below the name of the contact in the chat room.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/0*AZTUR7DdH4knFytw.png" /></figure><h3>Implementation in the web portal</h3><p>The server automatically sets the web portal user’s availability status based on whether the user is connected to the chat server or not. We also provide the user with an ability to change their status manually. The user can choose from o<em>nline</em>, a<em>way</em>, <em>busy</em> and a<em>ppear offline </em>statuses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/0*WhN4_ozTiPuXEgMc.png" /></figure><p>In some particular cases, the web portal automatically sets the user’s availability status. After a period of inactivity, we set the user’s availability status to<em> away</em> and when the user is in a video call, we set their availability status to <em>busy</em>.</p><p>The user may log in to more than one portal instances (e.g open the portal in another tab or in a different browser on another computer). To make their availability status consistent, we sync the statuses between those instances. So if the user sets their availability status to <em>away </em>in one portal instance, the same status will be passed on to all the other existing portal instances.</p><h3>Conclusion</h3><p>It is easier to interact with Ejabberd through the Ejabberd API. In this case we enabled the Roster Item operation through its API while keeping the service secure enough and ensuring that we grant permission to the APIs strictly on a need-to-know basis.</p><h3>References</h3><ul><li><a href="https://docs.ejabberd.im/developer/ejabberd-api/admin-api/">Ejabberd API Documentation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f67315c3b96" width="1" height="1" alt=""><hr><p><a href="https://medium.com/niceday-dev/enable-chat-online-status-within-niceday-apps-8f67315c3b96">Enable Chat Online Status within NiceDay Apps</a> was originally published in <a href="https://medium.com/niceday-dev">NiceDay Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>