Closed laees closed 1 week ago
I have found a way to do this by altering ./components/chatroom.js
. All I had to do was to add an Event of type FriendMessagesClient.NotifyAckMessageEcho#1
under the //Handlers section
SteamUserBase.prototype._handlerManager.add('FriendMessagesClient.NotifyAckMessageEcho#1', function (body) {
body = preProcessObject(body);
/*
console.log("Body:\n" + body);
*/
this.chat.emit("NotifyAckMessageEcho", body);
});
Problem description
I'm trying to detect when a friend chat message has been acknowledge by the logged in user (not the friend). The message acknowledgement is happening in a different session, meaning that my program should be informed when my desktop client reads a friend message.
Possible solution
An event that is fired when the logged in user has read a message with a callback containing:
steamid_friend
- The SteamID object for the friendunread_message_count
- How many unread messages are contained in this sessionCurrent workaround
I tried polling
getActiveFriendMessageSessions
orgetFriendMessageHistory
at a set interval to detect whenunread_message_count
changes. This however is unnecessarily resource intensive and is limited by the polling rate.I hope this is technically possible.