parley-messaging / ios-library

Parley iOS app library
MIT License
2 stars 2 forks source link

Polling of new messages is disabled when push is enabled. #82

Closed mat1th closed 4 months ago

mat1th commented 5 months ago

Describe the feature When remote notifications are enabled by the user the polling of new messages is disabled. I did not expect this behavoir to be here. As a user I do expect to receive new messages when I do stay on the message screen while having the push setting enabled or disabled.

See https://github.com/parley-messaging/ios-library/blob/master/Sources/Parley/Views/ParleyView.swift#L118 for the code that does this check.

Screenshot NA

Possible solution A possible solution would add a config property to enable or disable the polling behavoir.

alexkok commented 4 months ago

Hi @mat1th , thanks for reporting. Polling is currently only enabled when push notifications are disabled (as seen in the part of the code you referenced).

This is, because when push is enabled, we don't need polling because the push notifications handle the receiving of new messages also within the chat. Because of the push notification, the message shows up directly in the chat as well when properly implementing the steps described in the readme.

Can you elaborate why we would want/need the polling mechanism even when push is enabled?

alexkok commented 4 months ago

Will be added in the next release with #85

alexkok commented 4 months ago

Released in 4.1.0 :rocket: