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

Names for External Guest Users #17

Closed
gary-kim opened this issue Sep 21, 2020 · 2 comments · Fixed by #18
Closed

Names for External Guest Users #17

gary-kim opened this issue Sep 21, 2020 · 2 comments · Fixed by #18
Labels
bug Something isn't working

Comments

@gary-kim
Copy link
Owner

When a guest joins a public ally accessible room in Talk, the display name does not display (Guest).

It is currently not possible to figure out if a user is a guest or user on the instance so this should be added. Once that's added, projects using the library can use that information to append (Guest) for guest users.

It could also be useful to add a DisplayName() function that will automatically append (Guest).

// TalkRoomMessageData describes the data part of a ocs response for a Talk room message
type TalkRoomMessageData struct {
Message string `json:"message"`
ID int `json:"id"`
ActorID string `json:"actorId"`
ActorDisplayName string `json:"actorDisplayName"`
SystemMessage string `json:"systemMessage"`
Timestamp int `json:"timestamp"`
MessageType MessageType `json:"messageType"`
MessageParameters map[string]RichObjectString `json:"-"`
}

cc @nickvergessen

@gary-kim gary-kim added the bug Something isn't working label Sep 21, 2020
@nickvergessen
Copy link
Collaborator

Pseudo code:

if ActorID starts with guest/ then
  if ActorDisplayName.empty then
    return 'Guest'
  else
    return ActorDisplayName.append(' (Guest)')
  fi
else
// current handling
fi

@gary-kim
Copy link
Owner Author

That'd be good. I was thinking we could also add the actorType field as a ActorType type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants