Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User information stored in brain twice #286

Closed
seanfitzgeraldsc opened this issue Jan 27, 2017 · 3 comments
Closed

User information stored in brain twice #286

seanfitzgeraldsc opened this issue Jan 27, 2017 · 3 comments

Comments

@seanfitzgeraldsc
Copy link

seanfitzgeraldsc commented Jan 27, 2017

This ended up being the root cause of what looks like a bunch of similar issues to #80 , when digging through the contents of brain and adding a bunch of logging to getUserForName, I discovered that hipchat assigns different identifiers for users in each room, as well as in 1:1 chat. The user as identified in a room roster has mention information, whereas the 1:1 does not. I'm still trying to see if this is part of the hipchat xmpp protocol or part of the hubot-hipchat adapter.

Brain.getUserForName does not break out of its loop when it finds the first user, so as the count of user objects grows over time, the behavior does not remain consistent for any given user.

"2503896": {
            "email_address": "sean.fitzgerald@******.com",
            "id": "2503896",
            "jid": "*****[email protected]",
            "mention_name": "seanfitz",
            "name": "Sean Fitzgerald",
            "room": "*****[email protected]"
        }
"4694198": {
            "id": "4694198",
            "name": "Sean Fitzgerald",
            "room": "******[email protected]"
        }
@seanfitzgeraldsc
Copy link
Author

I've pushed #287 as a proposed patch.

@seanfitzgeraldsc
Copy link
Author

Hey @hipchat, is this repo still monitored?

@rberrelleza
Copy link
Contributor

#303 fixed this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants