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

Why can't I send a groupmessage using this method? #666

Closed
sFireFrog opened this issue Apr 26, 2019 · 3 comments
Closed

Why can't I send a groupmessage using this method? #666

sFireFrog opened this issue Apr 26, 2019 · 3 comments
Labels

Comments

@sFireFrog
Copy link

I use this method to send a message but it fails, how should I use it?

var  steamUnifiedMessages = steamClient.GetHandler<SteamUnifiedMessages>();
  CChatRoom_SendChatMessage_Request _Request = new CChatRoom_SendChatMessage_Request
                    {
                        chat_group_id = friend.SteamID,
                          chat_id = friend.SteamID.ToChatID(),
                        message = "test"
                    };

steamUnifiedMessages.SendMessage("ChatRoom.SendChatMessage#1", _Request);
@yaakov-h
Copy link
Member

Good question, doesn't yet have an answer here. #561.

@sFireFrog
Copy link
Author

sFireFrog commented Apr 28, 2019

Good question, doesn't yet have an answer here. #561.

@yaakov-h Ok,thank you for your reply, I have changed the way I can send it now(see below), but it doesn't match my usage scenario. This method is passive. I want to send the message actively but I can't get the two parameters groupid and chatid outside the notification callback.I still have a question. How can I trigger ChatRoomClient.NotifyIncomingChatMessage#1?

UnifiedClanChatRoomService = steamUnifiedMessages.CreateService<IChatRoom>();
                    var body = (CChatRoom_AckChatMessage_Notification)notification.Body;
                    CChatRoom_SendChatMessage_Request _Request = new CChatRoom_SendChatMessage_Request
                    {
                        chat_group_id = body.chat_group_id,
                        chat_id = body.chat_id,
                        message = "test"
                    };
                 UnifiedClanChatRoomService.SendMessage(x => x.SendChatMessage(_Request));

@yaakov-h
Copy link
Member

Closing as duplicate.

We don't have any information about or implementation of the new chat system as of yet... I really should get on it, though.

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

No branches or pull requests

2 participants