SpectrumIM / spectrum2

Spectrum 2 IM transports
https://spectrum.im
408 stars 91 forks source link

Spectrum did not automatically subscribe to my presence updates. #78

Open moyamo opened 8 years ago

moyamo commented 8 years ago

Spectrum no longer sends a WrapperMessage.TYPE_LOGOUT when the last resource of a user logs out. I'm having this problem in gateway mode. I think this bug was introduced when you ported spectrum to swift3.

jankaluza commented 8 years ago

Can you please attach or send me a log from that? It works for me here when testing.

moyamo commented 8 years ago
2015-12-13 19:10:13,506 INFO  Component.RAW: RAW DATA IN <presence from='moyamo@jabber.zone/BitlBee' to='xxxxxxxxx@whatsapp.example.com' type='unavailable'/>
2015-12-13 19:10:13,507 INFO  UserManager: PRESENCE2 999999999999@whatsapp.example.com
2015-12-13 19:10:13,507 INFO  User: PRESENCE moyamo@jabber.zone/BitlBee 999999999999@whatsapp.example.com
2015-12-13 19:10:13,509 INFO  Component.RAW: RAW DATA IN <presence from='moyamo@jabber.zone/BitlBee' to='999999999999@whatsapp.example.com' type='unavailable'/><presence from='moyamo@jabber.zone/BitlBee' to='999999999999@whatsapp.example.com' type='unavailable'/><presence from='moyamo@jabber.zone/BitlBee' to='999999999999@whatsapp.example.com' type='unavailable'/><presence from='moyamo@jabber.zone/BitlBee' to='999999999999@whatsapp.example.com' type='unavailable'/><presence from='moyamo@jabber.zone/BitlBee' to='999999999999@whatsapp.example.com' type='unavailable'/><presence from='moyamo@jabber.zone/BitlBee' to='999999999999@whatsapp.example.com' type='unavailable'/><presence from='moyamo@jabber.zone/BitlBee' to='999999999999@whatsapp.example.com' type='unavailable'/><presence from='moyamo@jabber.zone/BitlBee' to='999999999999@whatsapp.example.com' type='unavailable'/><presence from='moyamo@jabber.zone/BitlBee' to='999999999999@whatsapp.example.com' type='unavailable'/><presence from='moyamo@jabber.zone/BitlBee' to='999999999999@whatsapp.example.com' type='unavailable'/>
2015-12-13 19:10:13,509 INFO  UserManager: PRESENCE2 999999999999@whatsapp.example.com
2015-12-13 19:10:13,509 INFO  User: PRESENCE moyamo@jabber.zone/BitlBee 999999999999@whatsapp.example.com
2015-12-13 19:10:13,509 INFO  UserManager: PRESENCE2 999999999999@whatsapp.example.com
2015-12-13 19:10:13,509 INFO  User: PRESENCE moyamo@jabber.zone/BitlBee 999999999999@whatsapp.example.com
2015-12-13 19:10:13,509 INFO  UserManager: PRESENCE2 999999999999@whatsapp.example.com
2015-12-13 19:10:13,509 INFO  User: PRESENCE moyamo@jabber.zone/BitlBee 999999999999@whatsapp.example.com
2015-12-13 19:10:13,509 INFO  UserManager: PRESENCE2 999999999999@whatsapp.example.com
2015-12-13 19:10:13,509 INFO  User: PRESENCE moyamo@jabber.zone/BitlBee 999999999999@whatsapp.example.com
2015-12-13 19:10:13,509 INFO  UserManager: PRESENCE2 999999999999@whatsapp.example.com
2015-12-13 19:10:13,509 INFO  User: PRESENCE moyamo@jabber.zone/BitlBee 999999999999@whatsapp.example.com
2015-12-13 19:10:13,509 INFO  UserManager: PRESENCE2 999999999999@whatsapp.example.com
2015-12-13 19:10:13,509 INFO  User: PRESENCE moyamo@jabber.zone/BitlBee 999999999999@whatsapp.example.com
2015-12-13 19:10:13,509 INFO  UserManager: PRESENCE2 999999999999@whatsapp.example.com
2015-12-13 19:10:13,509 INFO  User: PRESENCE moyamo@jabber.zone/BitlBee 999999999999@whatsapp.example.com
2015-12-13 19:10:13,509 INFO  UserManager: PRESENCE2 999999999999@whatsapp.example.com
2015-12-13 19:10:13,510 INFO  User: PRESENCE moyamo@jabber.zone/BitlBee 999999999999@whatsapp.example.com
2015-12-13 19:10:13,510 INFO  UserManager: PRESENCE2 999999999999@whatsapp.example.com
2015-12-13 19:10:13,510 INFO  User: PRESENCE moyamo@jabber.zone/BitlBee 999999999999@whatsapp.example.com
2015-12-13 19:10:13,510 INFO  UserManager: PRESENCE2 999999999999@whatsapp.example.com
2015-12-13 19:10:13,510 INFO  User: PRESENCE moyamo@jabber.zone/BitlBee 999999999999@whatsapp.example.com
2015-12-13 19:10:13,531 INFO  Component.RAW: RAW DATA IN <presence from='moyamo@jabber.zone/BitlBee' to='999999999999@whatsapp.example.com' type='unavailable'/>
2015-12-13 19:10:13,531 INFO  UserManager: PRESENCE2 999999999999@whatsapp.example.com
2015-12-13 19:10:13,531 INFO  User: PRESENCE moyamo@jabber.zone/BitlBee 999999999999@whatsapp.example.com
2015-12-13 19:10:13,531 INFO  Component.RAW: RAW DATA IN <presence from='moyamo@jabber.zone/BitlBee' to='999999999999@whatsapp.example.com' type='unavailable'/>
2015-12-13 19:10:13,531 INFO  UserManager: PRESENCE2 999999999999@whatsapp.example.com
2015-12-13 19:10:13,532 INFO  User: PRESENCE moyamo@jabber.zone/BitlBee 999999999999@whatsapp.example.com
2015-12-13 19:10:13,532 INFO  Component.RAW: RAW DATA IN <presence from='moyamo@jabber.zone/BitlBee' to='bot@whatsapp.example.com' type='unavailable'/>
2015-12-13 19:10:13,532 INFO  UserManager: PRESENCE2 bot@whatsapp.example.com
2015-12-13 19:10:13,532 INFO  User: PRESENCE moyamo@jabber.zone/BitlBee bot@whatsapp.example.com
2015-12-13 19:10:13,602 INFO  NetworkPluginServer: PING to 0x7f08f3eb2810 (ID=37)
2015-12-13 19:10:13,602 INFO  NetworkPluginServer: PING to 0x7f08f3e93680 (ID=14)
moyamo commented 8 years ago

It turns out the the spectrum server in my roster did not subscribe to my presence updates. I fixed this by sending a presence available directly to the spectrum server. After the spectrum server received the presence available it attempted to subscribe to my presence updates, which I authorised.

I'm not sure why this didn't happen automatically.