diff --git a/main.py b/main.py index c91f3d5..59c4d96 100644 --- a/main.py +++ b/main.py @@ -316,10 +316,10 @@ class LabCleaningBot: match envelope: # Normal direct message (no edits, no reactions) - case EnvelopeData(dataMessage=DataMessage(message=message, groupInfo=None), sourceNumber=sourceNumber): - print(message, "direct", sourceNumber) + case EnvelopeData(dataMessage=DataMessage(message=message, groupInfo=None), source=source): + print(message, "direct", source) # Normal group message (no edits, no reactions) - case EnvelopeData(dataMessage=DataMessage(message=message, groupInfo=GroupInfo(groupId=group_id)), sourceNumber=sourceNumber): + case EnvelopeData(dataMessage=DataMessage(message=message, groupInfo=GroupInfo(groupId=group_id)), source=source): print(message, group_id) # Reaction in direct messages case EnvelopeData( @@ -332,7 +332,7 @@ class LabCleaningBot: groupInfo=None, timestamp=timestamp ), - sourceNumber=sourceNumber): + source=source): reactionTimestamp = signal_timestamp_to_datetime(timestamp) requestTimestamp = signal_timestamp_to_datetime(targetSentTimestamp) @@ -375,9 +375,9 @@ class LabCleaningBot: response_msg = "You cannot reject the request after the timeout." self.api.send_message( - SendMessageSimple(message=response_msg, recipients=[sourceNumber])) + SendMessageSimple(message=response_msg, recipients=[source])) - print(emoji, "direct", sourceNumber, isRemove) + print(emoji, "direct", source, isRemove) def create_or_update_task_group(self, task: Task) -> Result[str, str]: chatgroup = task.chatgroup