OpenFusionProject / OpenFusion

Open source server for the FusionFall client
MIT License
351 stars 64 forks source link

Email Notifications not displaying #251

Closed CPunch closed 5 months ago

CPunch commented 1 year ago

From a quick glance at Email.cpp, it looks like P_CL2FE_REQ_PC_EMAIL_UPDATE_CHECK is implemented, however the P_FE2CL_REP_PC_NEW_EMAIL response packet seems to have no effect?

yungcomputerchair commented 5 months ago

The new email packet does seem to work (it plays a sound and shows the email icon in the menu) but only if the count field is non-zero. I'll validate that the number of unread emails is being correctly fetched from the DB. If so, there's no further action to take here.

yungcomputerchair commented 5 months ago

Confirmed this is working as intended; we send the correct number of unread emails in the response packet and the client plays a sound + shows the email icon immediately if the number is non-zero.

Maybe what was throwing us off here is that the client sends an initial request after a minute and then subsequent requests every 10 minutes. I have a feeling the original server sent the P_FE2CL_REP_PC_NEW_EMAIL packet on email send if the recipient is online. Might be worth adding.