EkoMessageFlagger

@interface EkoMessageFlagger : NSObject

A editor encapsulates methods for managing messages

  • The context used to create the instance

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nonnull) EkoClient *client;

    Swift

    var client: EkoClient { get }
  • The message Id associated with the instance

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nonnull) EkoMessage *message;

    Swift

    var message: EkoMessage { get }
  • Designated intializer

    Declaration

    Objective-C

    - (nonnull instancetype)initWithClient:(nonnull EkoClient *)client
                                   message:(nonnull EkoMessage *)message;

    Swift

    init(client: EkoClient, message: EkoMessage)

    Parameters

    client

    A valid context instance

    message

    A valid message object

  • Flags the message, this is reported to the admin panel for the moderators to see

    Declaration

    Objective-C

    - (void)flagWithCompletion:(EkoRequestCompletion _Nullable)completion;

    Swift

    func flag(completion: EkoRequestCompletion? = nil)
  • Unflags the message

    Declaration

    Objective-C

    - (void)unflagWithCompletion:(EkoRequestCompletion _Nullable)completion;

    Swift

    func unflag(completion: EkoRequestCompletion? = nil)
  • The callback returns whether the logged-in user has flagged this message

    Declaration

    Objective-C

    - (void)isFlagByMeWithCompletion:(void (^_Nonnull)(BOOL))callback;

    Swift

    func isFlagByMe(completion callback: @escaping (Bool) -> Void)
  • Unavailable

    Block call of init and new because this object cannot be created directly

    Declaration

    Objective-C

    - (nonnull instancetype)init;