Fix messages not being created properly in open groups

pull/987/head
Mikunj Varsani 5 years ago
parent f594a5e5cf
commit d8b982e194

@ -1981,9 +1981,13 @@
// Public chat messages from ourselves should be outgoing // Public chat messages from ourselves should be outgoing
message = await createSentMessage(data); message = await createSentMessage(data);
} }
} else { }
// All other messages should be incoming
if (!message) {
message = await createMessage(data); message = await createMessage(data);
} }
const isDuplicate = await isMessageDuplicate(message); const isDuplicate = await isMessageDuplicate(message);
if (isDuplicate) { if (isDuplicate) {
// RSS expects duplciates, so squelch log // RSS expects duplciates, so squelch log

@ -105,6 +105,10 @@ class LokiFileServerInstance {
} }
await Promise.all( await Promise.all(
authorisations.map(async auth => { authorisations.map(async auth => {
if (typeof auth !== 'object') {
return;
}
// only skip, if in secondary search mode // only skip, if in secondary search mode
if (isRequest && auth.secondaryDevicePubKey !== user.username) { if (isRequest && auth.secondaryDevicePubKey !== user.username) {
// this is not the authorization we're looking for // this is not the authorization we're looking for

Loading…
Cancel
Save