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

Fix sending service notifications #1075

Merged
merged 6 commits into from
Jan 8, 2022
Merged

Fix sending service notifications #1075

merged 6 commits into from
Jan 8, 2022

Conversation

xPaw
Copy link
Member

@xPaw xPaw commented Jan 6, 2022

  • Fix notification servicemethods not working
  • Add SendNotification and deprecate SendMessage(..., true)

This was broken in #1036, ServiceMethodSendToClient was not the correct call. Notifications are sent by Steam by not setting the source jobid.

This logic can be verified by looking at the new chat's javascript. it has SendMsg/SendNotification on service transport. SendMsg uses SendMsgAndAwaitResponse which sets the jobid_source.

@Netshroud which notification message did you test?

@JustArchi
Copy link
Contributor

JustArchi commented Jan 6, 2022

I helped 🙂.

JustArchi added a commit to JustArchiNET/ArchiSteamFarm that referenced this pull request Jan 6, 2022
I spent far too much time and sweat on this, so I'll just link this as explanation: SteamRE/SteamKit#1075

HUGE THANKS to @xPaw for all the help, Pavel is the best
Copy link
Contributor

@JustArchi JustArchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested SendNotification() with below code as of 84f4049 - works.

		CFriendMessages_AckMessage_Notification request = new() {
			steamid_partner = steamID,
			timestamp = timestamp
		};

		UnifiedFriendMessagesService.SendNotification(x => x.AckMessage(request));

@JustArchi
Copy link
Contributor

JustArchi commented Jan 6, 2022

Also tested SendMessage() that was isNotification: false, also works.

🚢 it

@yaakov-h yaakov-h merged commit 82e04be into SteamRE:master Jan 8, 2022
@xPaw xPaw deleted the servicemethod-notifications branch January 8, 2022 12:46
@xPaw xPaw added this to the 2.5.0 milestone Mar 21, 2023
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

Successfully merging this pull request may close these issues.

3 participants