From bb942f6c8f6d4997ac6d514a9a1ae045da371789 Mon Sep 17 00:00:00 2001 From: Patryk Osmaczko Date: Fri, 28 Jul 2023 14:14:59 +0200 Subject: [PATCH] fix: increase community clock with channel members changes --- protocol/communities/community.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/protocol/communities/community.go b/protocol/communities/community.go index 97afbabab..6178c5c5e 100644 --- a/protocol/communities/community.go +++ b/protocol/communities/community.go @@ -772,6 +772,10 @@ func (o *Community) RemoveUserFromChat(pk *ecdsa.PublicKey, chatID string) (*pro key := common.PubkeyToHex(pk) delete(chat.Members, key) + if o.IsControlNode() { + o.increaseClock() + } + return o.config.CommunityDescription, nil } @@ -1900,6 +1904,10 @@ func (o *Community) AddMemberToChat(chatID string, publicKey *ecdsa.PublicKey, r }, } + if o.IsControlNode() { + o.increaseClock() + } + return changes, nil } @@ -1933,6 +1941,8 @@ func (o *Community) populateChatWithAllMembers(chatID string) (*CommunityChanges } chat.Members = o.Members() + o.increaseClock() + return result, nil }