Determine who left or arrived


(John) #1

Did something change with respect to a person leaving or arriving?

Previously, the code below would return a person and via displayName, I could figure who it was. Now (not sure when it changed for me), person is always null. Live logging shows the correct person arriving or leaving. Any ideas? I’m sorry if this is stupid. It wouldn’t bother me if it never worked, I’m just not sure why it quit working.

def presenceChange(evt) {
   def person = getPerson(evt)
    
   def displayName = person.displayName

//more code here

}

private getPerson(evt) {
	people.find{evt.deviceId == it.id}
}

(John) #2

Nevermind. Deleted the app and re-added. Problem gone.