https://metaplay.io logo
In-game mail for player to player requests
# questions-and-feedback
d
Hi, I'm looking at implementing a Friend request/accept flow for players to be able to connect in game. I was thinking of using the In-game mail as a way to send this type of request. When I went to the docs i realised the intention of the system is more for CRM type activity. Just wondering if you have any recommendations? Can it be used for infrequent player to player request like friendships or maybe gifting (not planned but as an example). Thanks Andre
a
Hi Andre! The in-game mail system implementation provided by the SDK is indeed heavily opinionated towards the contents being generated by an admin via dashboard (either directly or indirectly via broadcasts). The actual client-visible part that it provides is simply a list of mail items and a couple of actions for mail-like semantics. You'll probably have a better experience isolating your friend requests into a separate list/queue in the player model and creating a specialized set of actions for mutating that state. That said, there should be nothing stopping you from implementing a PlayerActor EntityAsk handler that accepts invitation requests from other players and sticks an an invitation mail-item into the mail inbox. You would then just maintain polymorphic mail content types internally by having separate classes that derive from
MetaInGameMail
and disallow creation of the "friend invitation" type of mails from dashboard. HTH, Antti