@ -207,12 +207,12 @@ public final class OpenGroupManager {
roomToken : String ,
roomToken : String ,
server : String ,
server : String ,
publicKey : String ,
publicKey : String ,
isConfigMessage: Bool ,
calledFromConfigHandling: Bool = false ,
dependencies : OGMDependencies = OGMDependencies ( )
dependencies : OGMDependencies = OGMDependencies ( )
) -> AnyPublisher < Void , Error > {
) -> AnyPublisher < Void , Error > {
// I f w e a r e c u r r e n t l y p o l l i n g f o r t h i s s e r v e r a n d a l r e a d y h a v e a T S G r o u p T h r e a d f o r t h i s r o o m t h e d o n o t h i n g
// I f w e a r e c u r r e n t l y p o l l i n g f o r t h i s s e r v e r a n d a l r e a d y h a v e a T S G r o u p T h r e a d f o r t h i s r o o m t h e d o n o t h i n g
if hasExistingOpenGroup ( db , roomToken : roomToken , server : server , publicKey : publicKey , dependencies : dependencies ) {
if hasExistingOpenGroup ( db , roomToken : roomToken , server : server , publicKey : publicKey , dependencies : dependencies ) {
SNLog ( " Ignoring join open group attempt (already joined), user initiated: \( ! isConfigMessage ) " )
SNLog ( " Ignoring join open group attempt (already joined), user initiated: \( ! calledFromConfigHandling ) " )
return Just ( ( ) )
return Just ( ( ) )
. setFailureType ( to : Error . self )
. setFailureType ( to : Error . self )
. eraseToAnyPublisher ( )
. eraseToAnyPublisher ( )
@ -276,7 +276,9 @@ public final class OpenGroupManager {
Future < Void , Error > { resolver in
Future < Void , Error > { resolver in
dependencies . storage . write { db in
dependencies . storage . write { db in
// E n q u e u e a c o n f i g s y n c j o b ( h a v e a n e w l y a d d e d o p e n g r o u p t o s y n c )
// E n q u e u e a c o n f i g s y n c j o b ( h a v e a n e w l y a d d e d o p e n g r o u p t o s y n c )
ConfigurationSyncJob . enqueue ( db )
if ! calledFromConfigHandling {
ConfigurationSyncJob . enqueue ( db )
}
// S t o r e t h e c a p a b i l i t i e s f i r s t
// S t o r e t h e c a p a b i l i t i e s f i r s t
OpenGroupManager . handleCapabilities (
OpenGroupManager . handleCapabilities (