Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get CustomModel in place of HKWMentionsAttribute #237

Open
ParagDevac opened this issue Sep 15, 2021 · 0 comments
Open

How to get CustomModel in place of HKWMentionsAttribute #237

ParagDevac opened this issue Sep 15, 2021 · 0 comments

Comments

@ParagDevac
Copy link

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 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant