Browse Source

dont need imgurl in each msg

hosting-provider
Evan Feenstra 5 years ago
parent
commit
ae0305aec0
  1. 4
      api/network/send.ts
  2. 4
      dist/api/network/send.js
  3. 2
      dist/api/network/send.js.map

4
api/network/send.ts

@ -130,7 +130,7 @@ function checkIfAutoConfirm(data){
export function newmsg(type, chat, sender, message){
const includeGroupKey = type===constants.message_types.group_create || type===constants.message_types.group_invite
const includeAlias = sender && sender.alias && chat.type===constants.chat_types.tribe
const includePhotoUrl = sender && sender.photoUrl && !sender.privatePhoto
// const includePhotoUrl = sender && sender.photoUrl && !sender.privatePhoto
return {
type: type,
chat: {
@ -145,7 +145,7 @@ export function newmsg(type, chat, sender, message){
sender: {
pub_key: sender.publicKey,
...includeAlias && {alias: sender.alias},
...includePhotoUrl && {photo_url: sender.photoUrl},
// ...includePhotoUrl && {photo_url: sender.photoUrl},
// ...sender.contactKey && {contact_key: sender.contactKey}
}
}

4
dist/api/network/send.js

@ -141,12 +141,12 @@ function checkIfAutoConfirm(data) {
function newmsg(type, chat, sender, message) {
const includeGroupKey = type === constants.message_types.group_create || type === constants.message_types.group_invite;
const includeAlias = sender && sender.alias && chat.type === constants.chat_types.tribe;
const includePhotoUrl = sender && sender.photoUrl && !sender.privatePhoto;
// const includePhotoUrl = sender && sender.photoUrl && !sender.privatePhoto
return {
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 }),
message: message,
sender: Object.assign(Object.assign({ pub_key: sender.publicKey }, includeAlias && { alias: sender.alias }), includePhotoUrl && { photo_url: sender.photoUrl })
sender: Object.assign({ pub_key: sender.publicKey }, includeAlias && { alias: sender.alias })
};
}
exports.newmsg = newmsg;

2
dist/api/network/send.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save