---
# System prepended metadata

title: Red Dot Numbers

---

# Red Dot Numbers 

## Target
* LALE sends the correct red dot number. 

## Problems 
1. Matrix has unreliable unread messages. 
	further detail: https://github.com/matrix-org/synapse/issues/2632

2. Matrix doesn't know the existing of AF (waiting job number)


## Proposed solution 
1. We don't have solution for **Point 1**.

2. Matrix / Sygnal needs to know the number of waiting job from AF. 
* Sygnal **needs a user password or lale_jwt** to connect to AF. 
* Better solution is **Lale does a sync with AF and save the number of waiting job to DB**. 
	Sygnal **read the number of waiting list from DB**. 

* If we let the **users sync to the server for updating the number of waiting jobs**, it will **degrade** the user performance. Because clients need to do many sync. 
	1. Sync with LALE to get the message. 
	2. Sync with AF go get the waiting job. 
	3. Sync with new API to update the number of waiting job. 

	So, Here I proposed **LALE take the role for updating the waiting job**. Because that's apart of sync.