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

google_chat_ros: enable to get therad_name message result #496

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

k-okada
Copy link
Member

@k-okada k-okada commented Oct 26, 2023

@mqcmd196 This is a modification to reply messages in the same thread like this
Screenshot from 2023-10-26 21-48-47

instead of creating a new thread like this one.
Screenshot from 2023-10-26 22-04-00

One strategy is to pass SimpleActionClient to the function, as in this PR modification.

(setq action goal name "google_chat_ros/send")
(setq ac (instance ros::simple-action-client :init action-goal-name google_chat_ros::SendMessageAction)))
(send-google-chat-text "spaces/AAAARE9CrfA" "Hello" :ac ac)
(send-google-chat-text "spaces/AAAARE9CrfA" "World" :thread-name (send (send ac :get-result) :message_result :thread_name) :ac ac)

Another solution would be to return the result of the message like k-okada@e9a4904 and write code like this

(setq r (send-google-chat-text "spaces/AAAARE9CrfA" "Hello"))
(send-google-chat-text "spaces/AAAARE9CrfA" "World" :thread-name (send r :message_result :thread_name)).

Which would be better? Or is there another way?

@mqcmd196
Copy link
Member

@k-okada
I think

Another solution would be to return the result of the message like k-okada@e9a4904 and write code like this

is better because the eus function is designed to be usable without knowing the detailed message specifications.

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

Successfully merging this pull request may close these issues.

2 participants