BlueBubblesApp / bluebubbles-server

Server for forwarding iMessages to clients within the BlueBubbles App ecosystem
https://bluebubbles.app
Apache License 2.0
554 stars 47 forks source link

Fix event type string for aliases removed event #607

Closed SeanReg closed 10 months ago

SeanReg commented 10 months ago

PrivateApiAddressEventHandler is using the incorrect "type" string for the alias removal event from the PrivateAPI Helper. The helper is sending "aliases-removed" (https://github.com/BlueBubblesApp/bluebubbles-helper/blob/master/Messages/MacOS-10/BlueBubblesHelper/BlueBubblesHelper.m#L757) but the server is looking for "alias-removed". This PR corrects the string so the server can start receiving the events.

zlshames commented 10 months ago

Good catch! That's completely my fault. I'll include this in the next release

zlshames commented 10 months ago

@SeanReg quick question, and I'm asking this because I do not have the code in front of me, so I can't test it at the moment. But the output/value of the __kIMAccountAliasesRemovedKey, is it a list or a single item for you?

SeanReg commented 10 months ago

@SeanReg quick question, and I'm asking this because I do not have the code in front of me, so I can't test it at the moment. But the output/value of the __kIMAccountAliasesRemovedKey, is it a list or a single item for you?

I actually haven't tested that part yet. Next I'm going to look into making changes to the app to display when the alias changes so I will test it then and can tweak the server if other changes are needed. Is there any way to trigger it without actually affecting my current Bluebubbles setup (trying to avoid unregistering my phone)?

Good catch! That's completely my fault. I'll include this in the next release

Do you want me to merge into development as is (with all the changes from master) or rebase my change to development to only include my change?

zlshames commented 10 months ago

@SeanReg quick question, and I'm asking this because I do not have the code in front of me, so I can't test it at the moment. But the output/value of the __kIMAccountAliasesRemovedKey, is it a list or a single item for you?

I actually haven't tested that part yet. Next I'm going to look into making changes to the app to display when the alias changes so I will test it then and can tweak the server if other changes are needed. Is there any way to trigger it without actually affecting my current Bluebubbles setup (trying to avoid unregistering my phone)?

Good catch! That's completely my fault. I'll include this in the next release

Do you want me to merge into development as is (with all the changes from master) or rebase my change to development to only include my change?

so it may not require de-registering your phone. You might be able to replicate it by just unchecking one of the aliases in the iMessage preferences. Not 100% sure on that though.

As for the github merge stuff, im not entirely sure why it's saying that you have all the master changes to go into development, because all the master changes are already in development. But if you want to rebase to see if that will fix it, that might be a good idea

SeanReg commented 10 months ago

Rebased, ready to merge

zlshames commented 10 months ago

fwiw, the data looks like this:

{
  event: 'aliases-removed',
  data: { __kIMAccountAliasesRemovedKey: [ 'alias@gmail.com' ] }
}