Skip to content

Commit

Permalink
📝 Add data_message type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteApfel committed Feb 26, 2024
1 parent 6f1d75e commit f396a50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import asyncio

from pullkin import Pullkin
from pullkin.models import Message, AppCredentials
from pullkin.proto.mcs_proto import DataMessageStanza

SENDER_ID = '<<SENDER_ID>>' # '1234567890'
# ANOTHER_SENDER_ID = '<<SENDER_ID>>' # '1234567890'
Expand All @@ -69,7 +70,7 @@ with open(".persistent_ids.txt", "r") as f:


@pullkin.on_notification()
async def on_notification(message: Message, data_message):
async def on_notification(message: Message, data_message: DataMessageStanza):
idstr = data_message.persistent_id + "\n"
with open(".persistent_ids.txt", "r") as f:
if idstr in f:
Expand Down

0 comments on commit f396a50

Please sign in to comment.