From dcfb833dbd8a861eedb0d0c29c32c85b472b613d Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 8 Mar 2024 16:40:12 +0200 Subject: [PATCH] :sparkles: add group_id to metadata --- redis_events/redis_events/v1_0/redis_queue/events/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/redis_events/redis_events/v1_0/redis_queue/events/__init__.py b/redis_events/redis_events/v1_0/redis_queue/events/__init__.py index 4df935760..cd0828aec 100755 --- a/redis_events/redis_events/v1_0/redis_queue/events/__init__.py +++ b/redis_events/redis_events/v1_0/redis_queue/events/__init__.py @@ -116,11 +116,14 @@ async def handle_event(profile: Profile, event: EventWithMetadata): LOGGER.debug(f"Sending message {payload} with topic {redis_topic}") origin = profile.settings.get("default_label") + group_id = profile.settings.get("wallet.group_id") metadata = {"time_ns": time.time_ns()} metadata_wallet_id = {"x-wallet-id": wallet_id} if wallet_id else {} + metadata_group_id = {"group_id": group_id} if group_id else {} metadata_origin = {"origin": origin} if origin else {} metadata.update(metadata_wallet_id) + metadata.update(metadata_group_id) metadata.update(metadata_origin) outbound = str.encode(