getFavoriteByPeerId
Retrieves a favorite by the associated peer ID.
This method searches the list of favorites for an entry that is linked to the provided peerId, which could represent either a contact or a room. If a matching favorite is found, the corresponding IRainbowFavorite object is returned. If no favorite is associated with the given peer ID, the function returns null
.
Return
The IRainbowFavorite object corresponding to the given peer ID, or null
if not found.
Parameters
peerId
The unique ID of the contact or room associated with the favorite.