cuuush / groupme-push

GNU General Public License v3.0
2 stars 1 forks source link

Don't compare integer sender_id to string self.user_id -- bug in desregard_self #2

Open SZRabinowitz opened 10 months ago

SZRabinowitz commented 10 months ago

I was trying to figure out why messages sent by my own account (edit: even though I turned on disregard_self) were getting sent to my on_message function.

After a bit of searching I found the culprit here: https://github.com/cuuush/groupme-push/blob/main/groupme_push/client.py#L158

                    and int(data["sender_id"]) == self.user_id

The issue is that the sender_id is being converted to an integer, while self.user_id is a string.

My guess is that the best solution is to convert them both to an integer. I will make a pull request soon.