try to add admin

pull/78/head
Ryan ZHAO 5 years ago
parent e73a8b0f0f
commit dc0d6fa1c3

@ -15,7 +15,7 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF" BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Loki Messenger.app" BuildableName = "Session.app"
BlueprintName = "Signal" BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj"> ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference> </BuildableReference>
@ -27,19 +27,17 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"> shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion> <MacroExpansion>
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF" BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Loki Messenger.app" BuildableName = "Session.app"
BlueprintName = "Signal" BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj"> ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference> </BuildableReference>
</MacroExpansion> </MacroExpansion>
<AdditionalOptions> <Testables>
</AdditionalOptions> </Testables>
</TestAction> </TestAction>
<LaunchAction <LaunchAction
buildConfiguration = "Debug" buildConfiguration = "Debug"
@ -56,7 +54,7 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF" BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Loki Messenger.app" BuildableName = "Session.app"
BlueprintName = "Signal" BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj"> ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference> </BuildableReference>
@ -73,8 +71,6 @@
isEnabled = "YES"> isEnabled = "YES">
</EnvironmentVariable> </EnvironmentVariable>
</EnvironmentVariables> </EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction> </LaunchAction>
<ProfileAction <ProfileAction
buildConfiguration = "App Store Release" buildConfiguration = "App Store Release"
@ -87,7 +83,7 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF" BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Loki Messenger.app" BuildableName = "Session.app"
BlueprintName = "Signal" BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj"> ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference> </BuildableReference>

@ -15,7 +15,7 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF" BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Loki Messenger.app" BuildableName = "Session.app"
BlueprintName = "Signal" BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj"> ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference> </BuildableReference>
@ -45,7 +45,7 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF" BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Loki Messenger.app" BuildableName = "Session.app"
BlueprintName = "Signal" BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj"> ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference> </BuildableReference>
@ -148,7 +148,7 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF" BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Loki Messenger.app" BuildableName = "Session.app"
BlueprintName = "Signal" BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj"> ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference> </BuildableReference>
@ -187,7 +187,7 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF" BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Loki Messenger.app" BuildableName = "Session.app"
BlueprintName = "Signal" BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj"> ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference> </BuildableReference>

@ -30,7 +30,7 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF" BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Loki Messenger.app" BuildableName = "Session.app"
BlueprintName = "Signal" BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj"> ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference> </BuildableReference>
@ -42,8 +42,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"> shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion> <MacroExpansion>
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
@ -53,14 +51,15 @@
ReferencedContainer = "container:Signal.xcodeproj"> ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference> </BuildableReference>
</MacroExpansion> </MacroExpansion>
<AdditionalOptions> <Testables>
</AdditionalOptions> </Testables>
</TestAction> </TestAction>
<LaunchAction <LaunchAction
buildConfiguration = "Debug" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "" selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn" selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
launchStyle = "0" launchStyle = "0"
askForAppToLaunch = "Yes"
useCustomWorkingDirectory = "NO" useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO" ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES" debugDocumentVersioning = "YES"
@ -72,13 +71,11 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF" BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Loki Messenger.app" BuildableName = "Session.app"
BlueprintName = "Signal" BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj"> ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference> </BuildableReference>
</BuildableProductRunnable> </BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction> </LaunchAction>
<ProfileAction <ProfileAction
buildConfiguration = "App Store Release" buildConfiguration = "App Store Release"
@ -92,7 +89,7 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF" BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Loki Messenger.app" BuildableName = "Session.app"
BlueprintName = "Signal" BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj"> ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference> </BuildableReference>

@ -591,7 +591,7 @@ static NSTimeInterval launchStartedAt;
return; return;
} }
OWSLogInfo(@"registered vanilla push token"); OWSLogInfo(@"registered vanilla push token %@", deviceToken);
[LKPushNotificationManager.shared registerWithToken:deviceToken]; [LKPushNotificationManager.shared registerWithToken:deviceToken];
[self.pushRegistrationManager didReceiveVanillaPushToken:deviceToken]; [self.pushRegistrationManager didReceiveVanillaPushToken:deviceToken];
} }

@ -50,7 +50,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, nullable) UIImage *groupAvatar; @property (nonatomic, nullable) UIImage *groupAvatar;
@property (nonatomic) NSMutableSet<NSString *> *memberRecipientIds; @property (nonatomic) NSMutableSet<NSString *> *memberRecipientIds;
@property (nonatomic) NSMutableSet<NSString* > *adminIds;
@property (nonatomic) GroupType groupType; @property (nonatomic) GroupType groupType;
@property (nonatomic) BOOL hasUnsavedChanges; @property (nonatomic) BOOL hasUnsavedChanges;
@ -530,11 +530,13 @@ NS_ASSUME_NONNULL_BEGIN
NSString *groupName = [self.groupNameTextField.text ows_stripped]; NSString *groupName = [self.groupNameTextField.text ows_stripped];
NSMutableArray<NSString *> *recipientIds = [self.memberRecipientIds.allObjects mutableCopy]; NSMutableArray<NSString *> *recipientIds = [self.memberRecipientIds.allObjects mutableCopy];
[recipientIds addObject:[self.contactsViewHelper localNumber]]; [recipientIds addObject:[self.contactsViewHelper localNumber]];
return [[TSGroupModel alloc] initWithTitle:groupName TSGroupModel *group = [[TSGroupModel alloc] initWithTitle:groupName
memberIds:recipientIds memberIds:recipientIds
image:self.groupAvatar image:self.groupAvatar
groupId:self.groupId groupId:self.groupId
groupType:self.groupType]; groupType:self.groupType];
[group setGroupAdminIds:[self.adminIds.allObjects copy]];
return group;
} }
#pragma mark - Group Avatar #pragma mark - Group Avatar

@ -145,6 +145,11 @@ const int32_t kGroupIdLength = 16;
return _groupName.filterStringForDisplay; return _groupName.filterStringForDisplay;
} }
- (void)setGroupAdminIds:(NSArray<NSString *> *)groupAdminIds
{
_groupAdminIds = groupAdminIds;
}
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

Loading…
Cancel
Save