IFriends interface
The local player’s friend list and private-chat (whisper) conversations, read from the game’s own data and refreshed every few seconds while in the world and in use (a Changed subscriber, a queued action, or a list read in the last ~30 s — the FIRST read starts the refresh, so its data can lag that read by a tick); plus the game’s own private-chat actions. Pair with IChat: whispers arrive there with PeerId = the conversation’s CharId, and are sent with ChatTarget.Whisper(charId).
Lists keep their last known contents outside the world (title screen / loading). The actions only queue: they run on the next framework tick in-world, through the same game code the friends window uses, and are dropped silently if the game refuses them. Any thread.
public interface IFriendsMembers
Section titled “Members”| name | description |
|---|---|
| Friends { get; } | Friends (blocked players excluded), sorted by charId. Replaced as a whole on change. |
| PrivateChats { get; } | Private-chat conversations in the game’s display order. Replaced as a whole on change. |
| event Changed | Fires on the Unity main thread after Friends and/or PrivateChats changed. |
| ClosePrivateChat(…) | Removes the conversation with charId from the game’s conversation list. |
| CreatePrivateChat(…) | Opens (creates) a conversation with charId in the game’s conversation list and loads its newest history, like starting a chat from a profile card. |
| MarkPrivateRead(…) | Marks the conversation with charId read up to its latest message, and refreshes the game’s unread badges (friend-chat red dot, HUD friend-message badge, native conversation rows). Does nothing when the game holds nothing unread for it; at most once a second per conversation (extra calls are dropped). |
| RequestPrivateHistory(…) | Asks the game for the newest page of history with charId (the game only sends whisper history for a conversation when it is opened). The messages then arrive on MessageReceived as history (IsHistory) with PeerId set; ones already delivered are not repeated. Does not mark them read. |
See Also
Section titled “See Also”- namespace Stellar.Abstractions.Services