Repository navigation
[#198] feat(messenger): integrate Facebook Messenger messaging channel - #202
Merged
Merged
Conversation
Trigger on tenant/com; target app-name com-agriconnect, namespace com-agriconnect-namespace, env CoM-Hydroponics; bake WEBDOMAIN com.agriconnect.akvotest.org. Images eu.gcr.io/akvo-lumen/com-agriconnect/*.
build.sh IMAGE_PREFIX=com-agriconnect; docker-compose.test.yml must match or the backend test service tries to pull agriconnect2/backend (denied).
Branch tenant/com contains a slash; composite-actions tags images with $GITHUB_REF_NAME.$GITHUB_SHA (build/push/rollout), and a slash is an invalid docker tag. Override GITHUB_REF_NAME=tenant-com on build-push and rollout so the tag is tenant-com.<sha>.
Each tenant deploys to its own namespace; a global deploy-to-test group
needlessly serialized tenant deploys behind main. Use
deploy-to-test-${{ github.ref_name }} so tenants deploy independently.
The env override for GITHUB_REF_NAME doesn't reach inside the composite action (GitHub re-injects the default). Instead, after checking out composite-actions, sed-patch the helper scripts (build/push/k8s-rollout) to run $3 through 'tr / -', so images tag/deploy as tenant-com.<sha>.
Expo @akvo/com-hydroponics-mobile (projectId 7e9f4622-d223-4d99-a005-5b96293bd978), slug com-hydroponics-mobile, app name CoM Hydroponics, Android package com.akvo.comhydroponics (test: .test).
…gure default hierarchy template
…istrative hierarchy
…m-hydroponics [#189] feat(tenant): setup initial COM hydroponics administrative hierarchy and configuration
…nglish-only onboarding
…nt-com [#195] merge(tenant/com): sync configurable escalation feature from main
… config.template.json
…nature verification
…ulti-channel dispatching
…d channel routing
…spatch architecture
… enabled by default
[#198] feat(messenger): integrate Facebook Messenger messaging channel for MHM-RMI tenant
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary & Context
This PR implements and hardens Facebook Messenger as a first-class messaging channel for AgriConnect alongside WhatsApp, resolving [#198]. It enables automated AI advisory responses, human Extension Officer (EO) live chat replies, ticket escalation quick replies, and weather intents for Messenger users (
messenger:<PSID>).Key Changes
1. Facebook Messenger Webhook & Routing
backend/routers/messenger.py):GET /api/messenger/webhook: Hub challenge verification with configurable verify token.POST /api/messenger/webhook: Message and postback event ingestion secured by HMAC SHA-256 (X-Hub-Signature-256) timing-safe verification.backend/routers/callbacks.py,backend/routers/messages.py):MessengerServiceorWhatsAppServicebased on customer identifier prefix (messenger:PSIDvs phone number).2. Message Reliability & Hardening
backend/services/messenger_service.py):"messaging_type": "RESPONSE"for Meta Graph API v21.0 compliance.3. Configurable Channels & Typing Indicator
backend/config.py,config.template.json):channels.messenger.enabledandchannels.whatsapp.enabledsettings.channels.messenger.typing_indicator_enabled(defaults tofalseto minimize Meta API quota consumption).4. Interactive Features
WeatherIntentService.Testing & Quality Gates
--exclude=alembic,patches).tests/test_messenger_router.py,test_messenger_service.py,test_message_endpoint.py, andtest_follow_up_service.py.Issue Reference
Closes #198