Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

JitsiMeetUserInfo.m 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright @ 2019-present 8x8, Inc.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import "JitsiMeetUserInfo+Private.h"
  17. @implementation JitsiMeetUserInfo
  18. - (instancetype)initWithDisplayName:(NSString *)displayName
  19. andEmail:(NSString *)email
  20. andAvatar:(NSURL *_Nullable) avatar {
  21. self = [super init];
  22. if (self) {
  23. self.displayName = displayName;
  24. self.email = email;
  25. self.avatar = avatar;
  26. }
  27. return self;
  28. }
  29. - (NSDictionary *)asDict {
  30. NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
  31. if (self.displayName != nil) {
  32. dict[@"displayName"] = self.displayName;
  33. }
  34. if (self.email != nil) {
  35. dict[@"email"] = self.email;
  36. }
  37. if (self.avatar != nil) {
  38. NSString *avatarURL = [self.avatar absoluteString];
  39. if (avatarURL != nil) {
  40. dict[@"avatarURL"] = avatarURL;
  41. }
  42. }
  43. return dict;
  44. }
  45. @end