First, it is related to #218 and #204, but it is a general problem. Therefore, I created a new issue.
Setup:
Prosody trunk (~May 2017) with latest Spectrum in gateway mode.
Problem:
On resource changes the status (e.g., available -> away or away -> available). Prosody spread this update to all buddies in the roster. Spectrum receives for each buddy in this gateway a presence update. The answer of Spectrum is an update of the presence of the gateway for all resources, even if the gateway status was not changed. The result is: If one resource is changing the presence status, all resources gets a flood of duplicated presence updates for the gateway.
Expected result:
Only on presence update per resource and only if the gateway status is changed.
Solution:
I made a quick hack in User::handlePresence Line 302:
if (presence->getTo().toString().find("@") != std::string::npos) return;