Browse Source

fixes for tribe join replay history

dependabot/npm_and_yarn/ini-1.3.7
Evan Feenstra 4 years ago
parent
commit
7e0cce6b8b
  1. 4
      dist/src/controllers/chatTribes.js
  2. 2
      dist/src/controllers/chatTribes.js.map
  3. 1
      dist/src/network/receive.js
  4. 2
      dist/src/network/receive.js.map
  5. 3
      src/controllers/chatTribes.ts
  6. 1
      src/network/receive.ts

4
dist/src/controllers/chatTribes.js

@ -476,8 +476,8 @@ function replayChatHistory(chat, contact) {
}
}
}
const isForwarded = true;
let msg = network.newmsg(m.type, chat, sender, Object.assign(Object.assign(Object.assign(Object.assign({ content }, mediaKeyMap && { mediaKey: mediaKeyMap }), newMediaTerms && { mediaToken: newMediaTerms }), m.mediaType && { mediaType: m.mediaType }), dateString && { date: dateString }), isForwarded);
const isForwarded = m.sender !== 1;
let msg = network.newmsg(m.type, chat, sender, Object.assign(Object.assign(Object.assign(Object.assign({ content, uuid: m.uuid }, mediaKeyMap && { mediaKey: mediaKeyMap }), newMediaTerms && { mediaToken: newMediaTerms }), m.mediaType && { mediaType: m.mediaType }), dateString && { date: dateString }), isForwarded);
msg = yield msg_1.decryptMessage(msg, chat);
const data = yield msg_1.personalizeMessage(msg, contact, true);
const mqttTopic = `${contact.publicKey}/${chat.uuid}`;

2
dist/src/controllers/chatTribes.js.map

File diff suppressed because one or more lines are too long

1
dist/src/network/receive.js

@ -46,6 +46,7 @@ exports.typesToReplay = [
msgtypes.group_join,
msgtypes.group_leave,
msgtypes.bot_res,
msgtypes.boost,
];
const botTypes = [
constants_1.default.message_types.bot_install,

2
dist/src/network/receive.js.map

File diff suppressed because one or more lines are too long

3
src/controllers/chatTribes.ts

@ -474,9 +474,10 @@ export async function replayChatHistory(chat, contact) {
}
}
}
const isForwarded = true
const isForwarded = m.sender!==1
let msg = network.newmsg(m.type, chat, sender, {
content, // replaced with the remoteMessageContent (u are owner) {}
uuid: m.uuid,
...mediaKeyMap && {mediaKey: mediaKeyMap},
...newMediaTerms && {mediaToken: newMediaTerms},
...m.mediaType && {mediaType: m.mediaType},

1
src/network/receive.ts

@ -38,6 +38,7 @@ export const typesToReplay=[ // should match typesToForward
msgtypes.group_join,
msgtypes.group_leave,
msgtypes.bot_res,
msgtypes.boost,
]
const botTypes=[
constants.message_types.bot_install,

Loading…
Cancel
Save