Feature: Add online status to each user (#452)
* Feature: Add online status to each user * Add OnlineStatusable, add availability status to thumbnail
This commit is contained in:
@@ -49,7 +49,6 @@ export const getters = {
|
||||
Object.values(_state.conversations),
|
||||
message => new DateHelper(message.created_at).format()
|
||||
);
|
||||
|
||||
return Object.keys(conversationGroupedByDate).map(date => {
|
||||
const messages = conversationGroupedByDate[date].map((message, index) => {
|
||||
let showAvatar = false;
|
||||
@@ -59,12 +58,11 @@ export const getters = {
|
||||
const nextMessage = conversationGroupedByDate[date][index + 1];
|
||||
const currentSender = message.sender ? message.sender.name : '';
|
||||
const nextSender = nextMessage.sender ? nextMessage.sender.name : '';
|
||||
showAvatar = currentSender !== nextSender;
|
||||
showAvatar =
|
||||
currentSender !== nextSender ||
|
||||
message.message_type !== nextMessage.message_type;
|
||||
}
|
||||
return {
|
||||
showAvatar,
|
||||
...message,
|
||||
};
|
||||
return { showAvatar, ...message };
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user