EaseConversationModel.m 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /************************************************************
  2. * * Hyphenate CONFIDENTIAL
  3. * __________________
  4. * Copyright (C) 2016 Hyphenate Inc. All rights reserved.
  5. *
  6. * NOTICE: All information contained herein is, and remains
  7. * the property of Hyphenate Inc.
  8. * Dissemination of this information or reproduction of this material
  9. * is strictly forbidden unless prior written permission is obtained
  10. * from Hyphenate Inc.
  11. */
  12. #import "EaseConversationModel.h"
  13. //#if ENABLE_LITE == 1
  14. #import <HyphenateLite/EMConversation.h>
  15. //#else
  16. //#import <Hyphenate/EMConversation.h>
  17. //#endif
  18. @implementation EaseConversationModel
  19. - (instancetype)initWithConversation:(EMConversation *)conversation
  20. {
  21. self = [super init];
  22. if (self) {
  23. _conversation = conversation;
  24. _title = _conversation.conversationId;
  25. if (conversation.type == EMConversationTypeChat) {
  26. _avatarImage = [UIImage imageNamed:@"EaseUIResource.bundle/user"];
  27. }
  28. else{
  29. _avatarImage = [UIImage imageNamed:@"EaseUIResource.bundle/group"];
  30. }
  31. }
  32. return self;
  33. }
  34. @end