React-native-gifted-chat: How to show avatars in every messages?

Created on 14 Jul 2017  路  5Comments  路  Source: FaridSafi/react-native-gifted-chat

Hi, I want to render avatars in every messages. Any ideas?

help wanted question

Most helpful comment

See Message.js function "isSameUser", make sure return false.

All 5 comments

use renderActions function

See Message.js function "isSameUser", make sure return false.

does that mean we have to override the source code within our node_modules ? i'd prefer not having to do that, is there a way to do this without actually override the source?

Need the feature

@IotFrontEnd @verzil
A small magic trick to use(Promise every message have a different user id : _id: user.id+ uuid()):

let message = {
        _id: messageID,
        createdAt: new Date(),
        user: {
          _id: user.id+ uuid(),
          name: user.name,
          avatar:  'http://www.hidoctor.ir/wp-content/uploads/2014/02/Model-lebas-parastar-24.jpg',
        },
    }
Was this page helpful?
0 / 5 - 0 ratings