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

[IC3] Per-message avatar #2857

Closed
compulim opened this issue Jan 28, 2020 · 0 comments · Fixed by #2943
Closed

[IC3] Per-message avatar #2857

compulim opened this issue Jan 28, 2020 · 0 comments · Fixed by #2943

Comments

@compulim
Copy link
Contributor

compulim commented Jan 28, 2020

Feature Request

Add a per-message avatar, so every activity can have different avatars.

User stories

Designs

Using channelData to deliver avatar image

  • Increased activity payload (potentially huge if image is delivered as data URI)
const activity = {
  channelData: {
    webchatAvatarImage: 'data:image/png;base64,...',
    webchatAvatarInitials: 'WW'
  },
  text: 'Hello, World!',
  type: 'message'
};

Using middleware for React element

  • Users can create their own animated or avatar that react to hover, etc.
  • Override previous designs
() => next => ({ activity }) => {
  const style = useMemo(() => ({ backgroundImage: 'url(data:image/png;base64,...)' }), []);

  return () => (
    <span style={style}>WW</span>
  );
}

Screenshots

image

[Enhancement]

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

Successfully merging a pull request may close this issue.

1 participant