This issue arises from the need to create a common method due to the amount (increasing) of duplicated user messages sent from different server classes and all of them hardcoded (this causes issues like missing packet attributes.. etc). See chat.coffee for example.
To solve this I propose to create a common method in user.coffee called for example buildUser() or something similar. This method will return a modificable packet built with the server builder so we can append later other information if needed. If the requested user is not online then we will need to create some condition to request that data from database.
This issue arises from the need to create a common method due to the amount (increasing) of duplicated user messages sent from different server classes and all of them hardcoded (this causes issues like missing packet attributes.. etc). See
chat.coffee
for example.To solve this I propose to create a common method in
user.coffee
called for examplebuildUser()
or something similar. This method will return a modificable packet built with the server builder so we can append later other information if needed. If the requested user is not online then we will need to create some condition to request that data from database.