Eddiebot: ^bio should have a way of removing a previously set value

Created on 31 Jul 2020  路  7Comments  路  Source: EddieJaoudeCommunity/EddieBot

I wanted to change my Instagram link and ended up with two instead.

Screenshot 2020-07-31 at 14 26 00

We need a way to overwrite an existing value.

I would further propose that this does not affect "Roles" which we can add to using "iam". As we could like to keep its current behaviour of appending new roles.

bug

Most helpful comment

To confirm that i'm correct or not, @mikeysan could update his ^bio instagram || ... one more time with a different value and try ^bio, the response should still contains 2 instagram entries instead of creating a 3rd entry.

@alrifay good spot too 馃憤 - I did make that change, but old data will not be able to be overwritten - I will need to go through and update the DB to fix old data

@mikeysan when you get a moment, if you could check - I can do the same on my profile too

All 7 comments

Oh 馃槺 , it should be able to overwrite the existing one 馃 . Good spot 馃憤

I'm not sure if this should be considered an issue or not.
I was curious to know the cause of the issue, so i looked up ^bio messages @mikeysan sent.
and found these two messages:

First message _(7/7/2020)_
image
Second message _(31/7/2020)_
image

Bot response was different in both messages, so looked for last commit before _7/7/2020_
https://github.com/EddieJaoudeCommunity/EddieBot/blob/cecb836aff5a519a035bc614009376e5830105a5/src/commandHandlers/bio.ts#L42
the args[0] value wasn't trimmed and field was equal to "instagram " with space at the end.

But the issue fixed later in feat(events): save event stream to db
https://github.com/EddieJaoudeCommunity/EddieBot/blob/0c7b461d9769c70c24f407339ae75c645e88770f/src/commandHandlers/bio.ts#L49

So i think this issue will not happen to any user who didn't use ^bio before _28/7/2020_, and the affected users will require @eddiejaoude to fix it from firestore.

To confirm that i'm correct or not, @mikeysan could update his ^bio instagram || ... one more time with a different value and try ^bio, the response should still contains 2 instagram entries instead of creating a 3rd entry.

To confirm that i'm correct or not, @mikeysan could update his ^bio instagram || ... one more time with a different value and try ^bio, the response should still contains 2 instagram entries instead of creating a 3rd entry.

@alrifay good spot too 馃憤 - I did make that change, but old data will not be able to be overwritten - I will need to go through and update the DB to fix old data

@mikeysan when you get a moment, if you could check - I can do the same on my profile too

@eddiejaoude I think i was right 馃榿

@Mikeysan updated his anstagram account, but only one of the two accounts has changed.

image

Thanks for confirming @alrifay and @mikeysan

I think this issue is resolved since @eddiejaoude already fixed it from the database.
And the bot has a command bio delete #212 to clear the bio.
Should we close it?

@alrifay good point, lets close for now 馃憤 . Thank you !

Was this page helpful?
0 / 5 - 0 ratings