Don't send new members event when there are no new members
This commit is contained in:
parent
d04e54e54e
commit
9dffff042e
|
@ -723,7 +723,9 @@ func (m *Messenger) CreateGroupChatWithMembers(ctx context.Context, name string,
|
|||
chat.updateChatFromGroupMembershipChanges(contactIDFromPublicKey(&m.identity.PublicKey), group)
|
||||
|
||||
clock, _ = chat.NextClockAndTimestamp(m.getTimesource())
|
||||
|
||||
// Add members
|
||||
if len(members) > 0 {
|
||||
event := v1protocol.NewMembersAddedEvent(members, clock)
|
||||
event.ChatID = chat.ID
|
||||
err = event.Sign(m.identity)
|
||||
|
@ -735,6 +737,8 @@ func (m *Messenger) CreateGroupChatWithMembers(ctx context.Context, name string,
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
recipients, err := stringSliceToPublicKeys(group.Members(), true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue