updateGroup: Use hasMember instead of 'left' attribute for membership
This commit is contained in:
parent
b32d068e83
commit
fe49edce8a
2 changed files with 4 additions and 1 deletions
|
@ -2785,6 +2785,7 @@ async function updateGroup(
|
||||||
{ viaSync = false } = {}
|
{ viaSync = false } = {}
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const { newAttributes, groupChangeMessages, members } = updates;
|
const { newAttributes, groupChangeMessages, members } = updates;
|
||||||
|
const ourUuid = window.textsecure.storage.user.getCheckedUuid();
|
||||||
|
|
||||||
const startingRevision = conversation.get('revision');
|
const startingRevision = conversation.get('revision');
|
||||||
const endingRevision = newAttributes.revision;
|
const endingRevision = newAttributes.revision;
|
||||||
|
@ -2792,7 +2793,8 @@ async function updateGroup(
|
||||||
const isInitialDataFetch =
|
const isInitialDataFetch =
|
||||||
!isNumber(startingRevision) && isNumber(endingRevision);
|
!isNumber(startingRevision) && isNumber(endingRevision);
|
||||||
const isInGroup = !updates.newAttributes.left;
|
const isInGroup = !updates.newAttributes.left;
|
||||||
const justJoinedGroup = conversation.get('left') && isInGroup;
|
const justJoinedGroup =
|
||||||
|
!conversation.hasMember(ourUuid.toString()) && isInGroup;
|
||||||
|
|
||||||
// Ensure that all generated messages are ordered properly.
|
// Ensure that all generated messages are ordered properly.
|
||||||
// Before the provided timestamp so update messages appear before the
|
// Before the provided timestamp so update messages appear before the
|
||||||
|
|
|
@ -2211,6 +2211,7 @@ export function initialize({
|
||||||
timeout: 0,
|
timeout: 0,
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
version,
|
version,
|
||||||
|
redactUrl: _createRedactor(key),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue