finos / symphony-bdk-python

Symphony Python Bot Development Kit (BDK)
https://symphony-bdk-python.finos.org/
Apache License 2.0
31 stars 34 forks source link

#295 Bug fix: presence not working with DF2 #302

Closed symphony-soufiane closed 2 years ago

symphony-soufiane commented 2 years ago

Description

Closes #295 When using DF2, the bot presence is handled in Agent side. The datafeed ackId has been previously updated to include a boolean field update_presence in addition to the ackId string. This boolean field allows Agent to update bot presence along with the DF heartbeat. The field default value is True and cannot be changed by the bot (it is only customisable via API calls).

The issue preventing the presence update was happening because the default value of update_presence, which is True, was generated as None in BDK Python, which in turn is mapped to False in Agent side. Consequently, Agent was skipping bot presence update.

In this commit, we updated the generated code to use the latest that we changed to set the default value for optiona vars, if provided, otherwise None is used. Previously, None was always set in any case.

Checklist

symphony-soufiane commented 2 years ago

The fix in openapi-generator fork's branch that is used to package the openapi-generator-cli.jar that we added in this PR, can be found here: https://github.com/symphony-soufiane/openapi-generator/commit/f0667fb31689ff4a495f9411573e069568489cdd