WFCCConversation.m 811 B

12345678910111213141516171819202122232425262728
  1. //
  2. // WFCCConversation.m
  3. // WFChatClient
  4. //
  5. // Created by heavyrain on 2017/8/16.
  6. // Copyright © 2017年 WildFireChat. All rights reserved.
  7. //
  8. #import "WFCCConversation.h"
  9. @implementation WFCCConversation
  10. +(instancetype)conversationWithType:(WFCCConversationType)type target:(NSString *)target line:(int)line {
  11. WFCCConversation *conversation = [[WFCCConversation alloc] init];
  12. conversation.type = type;
  13. conversation.target = target;
  14. conversation.line = line;
  15. return conversation;
  16. }
  17. - (BOOL)isEqual:(id)object {
  18. if ([object isMemberOfClass:[WFCCConversation class]]) {
  19. WFCCConversation *o = (WFCCConversation *)object;
  20. if (self.type == o.type && [self.target isEqual:o.target] && self.line == o.line) {
  21. return YES;
  22. }
  23. }
  24. return NO;
  25. }
  26. @end