minecraft-initiative / UniversalFriends

A library that aims at having friends that are the same for each client.
Other
19 stars 3 forks source link

Detect name changes based on stored UUID #10

Open nothub opened 4 years ago

nothub commented 4 years ago

problem example:

Alice friends Bob. Bob changes name to PopBob. Alice unfriends Bob, unaware he isnt called Bob anymore.

IronException commented 4 years ago

yea that's planned to happen

5HT2 commented 4 years ago

This is why you store as UUID and display as username

IronException commented 4 years ago

don't worry we only save UUIDs. I just haven't implemented it yet

5HT2 commented 4 years ago

^ ye so this can be closed when it is

IronException commented 4 years ago

^

nothub commented 4 years ago

the example i stated would require to save referr to old and new names, so alice is still able to remove bob even when he changed his name. otherwise alice wont find bob in her list anymore.

nothub commented 4 years ago

another solution would be to poll namemc api or smthg for the last change of the name when the change was older then a month and someone else registered the name.

5HT2 commented 4 years ago

That seems like it could break. How about having saving convert the username to UUID so you're always only storing UUID?

nothub commented 4 years ago

that would not meet the requirements of the problem i stated.

5HT2 commented 4 years ago

This is why you store as UUID and display as username

Like what I said here?

nothub commented 4 years ago

yes, because when you just store the uuid and referr to the current username, you have no way for users to delete an entry by referring to the last username before a potential namechange.

5HT2 commented 4 years ago

No, they would have to refer to the new username, as would be listed in their friends list

nothub commented 4 years ago

yeah, and thats exactly the problem i see here. when you want to track your enemies, you wont be informed about their namechanges at all times.

5HT2 commented 4 years ago

You could store the UUID + current name and then check when changed, but that's up to the person using the library don't you think?

nothub commented 4 years ago

imho this should be a feature in the library, not smthg the user of the lib should have to implement.

5HT2 commented 4 years ago

So just a store + compare function? That would be a different issue to create then

nothub commented 4 years ago

yeah, my idea for this is either this:

the example i stated would require to save referr to old and new names, so alice is still able to remove bob even when he changed his name. otherwise alice wont find bob in her list anymore.

or this:

another solution would be to poll namemc api or smthg for the last change of the name when the change was older then a month and someone else registered the name.

nothub commented 4 years ago

ideally, this shouldnt rely on the namemc api. so i guess storing the last name locally would be the way to go.

zeroeightysix commented 4 years ago

Name change because the UUID thing has always been a thing. We do need something in place to see if usernames have changed however.