Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Unanswered
Any ability to capture @someone and store it into a variable?


From your use of underscores, I assume you're using the Python BDK.

You can use the slash command decorator and include an @mention as an argument in your pattern.
https://symphony-bdk-python.finos.org/markdown/activity-api.html#slash-command-pattern-format

For example,

@activities.slash("/ping {@person}")
async def on_echo_mention(context: CommandContext):
    person = context.arguments.get_mention("person")
    name = person.user_display_name
    uid = person.user_id
    await bdk.messages().send_message(context.stream_id, f"Hello <mention uid=\"{uid}\" />")

There's no need to do any validation since an @mention will always resolve to an actual user. However, this could be either an internal or external user - so be wary of using the user id immediately to create a new IM and send a message if your bot isn't connected to the external user.

1
1
Posted one year ago
Edited one year ago
Yong Sheng Tan
39 × 2 Administrator
  
  

Hey @Yong Sheng Tan, Thanks for answering this. Super helpful and I did not know about this capability. I'll give it a shot and report back here with issues. Thanks again!

dk   one year ago Report
  
  

Actually I was playing with this today and it came out in the 2.4.0 release. I posted here about some of the shortcomings I ran into with it: https://github.com/finos/symphony-bdk-python/issues/303

dk   one year ago Report
534 Views
0 Answers
one year ago
one year ago