diff --git a/gcn_email/core.py b/gcn_email/core.py index 141152e..c46ca6c 100644 --- a/gcn_email/core.py +++ b/gcn_email/core.py @@ -88,7 +88,9 @@ def subscribe_to_topics(consumer: Consumer): # This may need to be updated if new topics have a format different than # 'gcn.classic.[text | voevent | binary].[topic]' topics = [ - topic for topic in consumer.list_topics().topics if topic.startswith("gcn.") + topic + for topic in consumer.list_topics().topics + if topic.startswith("gcn.") or topic.startswith("igwn") ] log.info("Subscribing to topics: %r", topics) consumer.subscribe(topics) @@ -106,7 +108,7 @@ def kafka_message_to_email(message): maintype="application", subtype="xml", ) - elif topic.startswith("gcn.notices."): + elif topic.startswith("gcn.notices.") or topic.startswith("igwn."): valueJson = json.loads(message.value().decode()) replace_long_values(valueJson, 512) email_message.set_content(json.dumps(valueJson, indent=4))