Skip to content

Commit

Permalink
Merge pull request #2780 from digitalfabrik/bugfix/fcm_settings
Browse files Browse the repository at this point in the history
Fix outdated references to FCM_KEY
  • Loading branch information
david-venhoff committed May 17, 2024
2 parents e9c7ea4 + 74baad1 commit 7438b1e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/src/prod-server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Integreat CMS Package
[integreat-cms]

SECRET_KEY = <your-secret-key>
FCM_KEY = <your-firebase-key>
FCM_CREDENTIALS = <path-your-firebase-credentials-file>
BASE_URL = https://cms.integreat-app.de
LOGFILE = /var/integreat-cms.log

Expand Down
4 changes: 2 additions & 2 deletions example-configs/integreat-cms.ini
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ IMPRINT_SLUG = imprint
[secrets]
# The secret key for this installation [required]
SECRET_KEY = <your-secret-key>
# If you want to send push notification to your app users, set your firebase key here [optional, defaults to None]
FCM_KEY = <your-firebase-key>
# If you want to send push notification to your app users, set a path to your firebase credentials file here [optional, defaults to None]
FCM_CREDENTIALS = <your-firebase-key>
# If you want to use automatic translations via DeepL, set your API auth key here [optional, defaults to None]
DEEPL_AUTH_KEY = <your-deepl-auth-key>

Expand Down
4 changes: 2 additions & 2 deletions integreat_cms/core/circleci_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

#: Set a dummy secret key for CircleCI build even if it's not in debug mode
SECRET_KEY = "dummy"
#: Set dummy key to test push notifications
FCM_KEY = "dummy"
#: Set dummy credentials path to test push notifications
FCM_CREDENTIALS = "dummy"
#: Enable manually because existing setting derives from the unset env var
FCM_ENABLED = True
#: Set dummy SUMM.AI API key to test translations into Easy German
Expand Down
4 changes: 2 additions & 2 deletions integreat_cms/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@
)

#: Path to the saved credential json file
FCM_CREDENTIALS: Final[str | None] = os.environ.get("INTEGREAT_CMS_FCM_CREDENTIALS")
FCM_CREDENTIALS: str | None = os.environ.get("INTEGREAT_CMS_FCM_CREDENTIALS")

#: Whether push notifications via Firebase are enabled.
#: This is ``True`` if :attr:`~integreat_cms.core.settings.FCM_KEY` is set, ``False`` otherwise.
#: This is ``True`` if :attr:`~integreat_cms.core.settings.FCM_CREDENTIALS` is set, ``False`` otherwise.
FCM_ENABLED: bool = bool(FCM_CREDENTIALS)

#: The available push notification channels
Expand Down
6 changes: 3 additions & 3 deletions tools/_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ function require_installed {
INTEGREAT_CMS_DEBUG=1
export INTEGREAT_CMS_DEBUG
# Set dummy FCM key to test functionality
if [[ -z "${INTEGREAT_CMS_FCM_KEY}" ]]; then
INTEGREAT_CMS_FCM_KEY="dummy"
export INTEGREAT_CMS_FCM_KEY
if [[ -z "${INTEGREAT_CMS_FCM_CREDENTIALS}" ]]; then
INTEGREAT_CMS_FCM_CREDENTIALS="dummy"
export INTEGREAT_CMS_FCM_CREDENTIALS
fi
fi
fi
Expand Down

0 comments on commit 7438b1e

Please sign in to comment.