devopsinthecloud icon indicating copy to clipboard operation
devopsinthecloud copied to clipboard

How to get CustomModel in place of HKWMentionsAttribute

Open ParagDevac opened this issue 3 years ago • 0 comments

Currently i have implemented it , but when i get mention from plugin.mention() i am getting as [HKWMentionsAttribute]. Actually , here i need more data from my [MentionsEntity]. So, is it possible to get data as [MentionsEntity] in place of HKWMentionsAttribute ?

var myDict = String:[String] //Here i am getting [HKWMentionsAttribute] but i need as [MentionsEntity] if let mPlug = plugin , let ment = mPlug.mentions() as? [MentionsEntity] , ment.count > 0 {

        ment.enumerated().forEach { (index , mentionedEntity) in
            if mentionedEntity.entityMentionedType() == "user" {
                myDict["user_ids"]?.append(mentionedEntity.entityId())
                
            } else if mentionedEntity.entityMentionedType() == "garba_class" {
                myDict["class_ids"]?.append(mentionedEntity.entityId())
            }
        }
        
    }

please help me . Thank you .

ParagDevac avatar Sep 15 '21 15:09 ParagDevac