|
@ -164,7 +164,7 @@ function checkIfAutoConfirm(data) { |
|
|
confirmations_1.tribeOwnerAutoConfirmation(data.message.id, data.chat.uuid); |
|
|
confirmations_1.tribeOwnerAutoConfirmation(data.message.id, data.chat.uuid); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
function newmsg(type, chat, sender, message, isForwarded) { |
|
|
function newmsg(type, chat, sender, message, isForwarded, includeStatus) { |
|
|
const includeGroupKey = type === constants_1.default.message_types.group_create || type === constants_1.default.message_types.group_invite; |
|
|
const includeGroupKey = type === constants_1.default.message_types.group_create || type === constants_1.default.message_types.group_invite; |
|
|
const includeAlias = sender && sender.alias && chat.type === constants_1.default.chat_types.tribe; |
|
|
const includeAlias = sender && sender.alias && chat.type === constants_1.default.chat_types.tribe; |
|
|
let aliasToInclude = sender.alias; |
|
|
let aliasToInclude = sender.alias; |
|
@ -176,6 +176,9 @@ function newmsg(type, chat, sender, message, isForwarded) { |
|
|
if (!isForwarded && includePhotoUrl && chat.myPhotoUrl) { |
|
|
if (!isForwarded && includePhotoUrl && chat.myPhotoUrl) { |
|
|
photoUrlToInclude = chat.myPhotoUrl; |
|
|
photoUrlToInclude = chat.myPhotoUrl; |
|
|
} |
|
|
} |
|
|
|
|
|
if (!includeStatus && message.status) { |
|
|
|
|
|
delete message.status; |
|
|
|
|
|
} |
|
|
return { |
|
|
return { |
|
|
type: type, |
|
|
type: type, |
|
|
chat: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ uuid: chat.uuid }, chat.name && { name: chat.name }), (chat.type || chat.type === 0) && { type: chat.type }), chat.members && { members: chat.members }), (includeGroupKey && chat.groupKey) && { groupKey: chat.groupKey }), (includeGroupKey && chat.host) && { host: chat.host }), |
|
|
chat: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ uuid: chat.uuid }, chat.name && { name: chat.name }), (chat.type || chat.type === 0) && { type: chat.type }), chat.members && { members: chat.members }), (includeGroupKey && chat.groupKey) && { groupKey: chat.groupKey }), (includeGroupKey && chat.host) && { host: chat.host }), |
|
|