Save group members when creating groups from non-updates
Follow up to b0da4910
. When inferring membership of the sender in an
unknown group, remember to save and return the group members.
Generally, this should only effect standalone clients unless someone
managed to clear their groups db table, since linked clients get group
info synced at registration.
// FREEBIE
This commit is contained in:
parent
a3d29a92bb
commit
847fa43520
2 changed files with 2 additions and 4 deletions
|
@ -39577,9 +39577,8 @@ MessageReceiver.prototype = {
|
|||
|
||||
promises.push(textsecure.storage.groups.getNumbers(decrypted.group.id).then(function(existingGroup) {
|
||||
if (existingGroup === undefined) {
|
||||
var members = decrypted.group.members;
|
||||
if (decrypted.group.type != textsecure.protobuf.GroupContext.Type.UPDATE) {
|
||||
members = [source];
|
||||
decrypted.group.members = [source];
|
||||
console.log("Got message for unknown group");
|
||||
}
|
||||
return textsecure.storage.groups.createNewGroup(decrypted.group.members, decrypted.group.id);
|
||||
|
|
|
@ -297,9 +297,8 @@ MessageReceiver.prototype = {
|
|||
|
||||
promises.push(textsecure.storage.groups.getNumbers(decrypted.group.id).then(function(existingGroup) {
|
||||
if (existingGroup === undefined) {
|
||||
var members = decrypted.group.members;
|
||||
if (decrypted.group.type != textsecure.protobuf.GroupContext.Type.UPDATE) {
|
||||
members = [source];
|
||||
decrypted.group.members = [source];
|
||||
console.log("Got message for unknown group");
|
||||
}
|
||||
return textsecure.storage.groups.createNewGroup(decrypted.group.members, decrypted.group.id);
|
||||
|
|
Loading…
Reference in a new issue