Fix closed group infinite request loop

pull/1206/head
Mikunj 5 years ago
parent f7a25ccacf
commit 23b05107fb

@ -1861,7 +1861,8 @@
}, },
sendGroupInfo(recipient) { sendGroupInfo(recipient) {
if (this.isClosedGroup()) { // Only send group info if we're a closed group and we haven't left
if (this.isClosedGroup() && !this.get('left')) {
const updateParams = { const updateParams = {
timestamp: Date.now(), timestamp: Date.now(),
groupId: this.id, groupId: this.id,

@ -72,11 +72,14 @@ export async function preprocessGroupMessage(
return true; return true;
} }
} }
if (group.type === GROUP_TYPES.REQUEST_INFO && !newGroup) { if (group.type === GROUP_TYPES.REQUEST_INFO) {
window.libloki.api.debug.logGroupRequestInfo( // We can only send the request info back if we have the information
`Received GROUP_TYPES.REQUEST_INFO from source: ${source}, primarySource: ${primarySource}, sending back group info.` if (!newGroup) {
); window.libloki.api.debug.logGroupRequestInfo(
conversation.sendGroupInfo(source); `Received GROUP_TYPES.REQUEST_INFO from source: ${source}, primarySource: ${primarySource}, sending back group info.`
);
conversation.sendGroupInfo(source);
}
return true; return true;
} }

Loading…
Cancel
Save