You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Dev to Main integration from CL #2446290
[CL 2456855 by Laurent Delayen in Main branch]
This commit is contained in:
@@ -786,26 +786,26 @@ bool FFriendsAndChatManager::IsInJoinableGameSession() const
|
||||
bool bIsJoinable = false;
|
||||
|
||||
if (OnlineSub != nullptr &&
|
||||
OnlineSub->GetIdentityInterface().IsValid())
|
||||
OnlineIdentity.IsValid())
|
||||
{
|
||||
IOnlineSessionPtr SessionInt = OnlineSub->GetSessionInterface();
|
||||
if (SessionInt.IsValid())
|
||||
{
|
||||
{
|
||||
FNamedOnlineSession* Session = SessionInt->GetNamedSession(GameSessionName);
|
||||
if (Session)
|
||||
{
|
||||
{
|
||||
bool bPublicJoinable = false;
|
||||
bool bFriendJoinable = false;
|
||||
bool bInviteOnly = false;
|
||||
if (Session->GetJoinability(bPublicJoinable, bFriendJoinable, bInviteOnly))
|
||||
{
|
||||
{
|
||||
// User's game is joinable in some way if any of this is true (context needs to be handled outside this function)
|
||||
bIsJoinable = bPublicJoinable || bFriendJoinable || bInviteOnly;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return bIsJoinable;
|
||||
}
|
||||
|
||||
|
||||
@@ -856,5 +856,6 @@ private:
|
||||
FDelegateHandle OnPresenceReceivedCompleteDelegateHandle;
|
||||
FDelegateHandle OnGameInviteReceivedDelegateHandle;
|
||||
FDelegateHandle OnDestroySessionCompleteDelegateHandle;
|
||||
FDelegateHandle OnQueryUserIdMappingCompleteDelegateHandle;
|
||||
FDelegateHandle UpdateFriendsTickerDelegateHandle;
|
||||
};
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "Online.h"
|
||||
#include "OnlineSubsystem.h"
|
||||
#include "OnlineFriendsInterface.h"
|
||||
#include "OnlineGroupsInterface.h"
|
||||
#include "OnlineUserInterface.h"
|
||||
#include "OnlineMessageInterface.h"
|
||||
#include "OnlinePresenceInterface.h"
|
||||
|
||||
@@ -311,7 +311,7 @@ private:
|
||||
ChatItem->FromName = FText::FromString(*ChatMessage->GetNickname());
|
||||
ChatItem->Message = FText::FromString(*ChatMessage->GetBody());
|
||||
ChatItem->MessageType = EChatMessageType::Global;
|
||||
ChatItem->MessageTimeText = FText::AsTime(ChatMessage->GetTimestamp(), EDateTimeStyle::Short);
|
||||
ChatItem->MessageTimeText = FText::AsTime(FDateTime::UtcNow(), EDateTimeStyle::Short); // use local received time for consistency
|
||||
ChatItem->ExpireTime = ChatMessage->GetTimestamp() + FTimespan::FromSeconds(GlobalMessageLifetime);
|
||||
ChatItem->bIsFromSelf = ChatMessage->GetUserId() == *LoggedInUser;
|
||||
TSharedPtr<IFriendItem> FoundFriend = FFriendsAndChatManager::Get()->FindUser(ChatMessage->GetUserId());
|
||||
@@ -336,7 +336,7 @@ private:
|
||||
ChatItem->SenderId = FoundFriend->GetUniqueID();
|
||||
ChatItem->Message = FText::FromString(*ChatMessage->GetBody());
|
||||
ChatItem->MessageType = EChatMessageType::Whisper;
|
||||
ChatItem->MessageTimeText = FText::AsTime(ChatMessage->GetTimestamp(), EDateTimeStyle::Short);
|
||||
ChatItem->MessageTimeText = FText::AsTime(FDateTime::UtcNow(), EDateTimeStyle::Short); // use local received time for consistency
|
||||
ChatItem->ExpireTime = ChatMessage->GetTimestamp() + FTimespan::FromSeconds(WhisperMessageLifetime);
|
||||
ChatItem->bIsFromSelf = false;
|
||||
ChatItem->MessageRef = ChatMessage;
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
Actions.Add(EFriendActionType::JoinGame);
|
||||
}
|
||||
}
|
||||
if (FriendItem->IsOnline() && FriendItem->CanInvite() && !bIsFriendInSameSession && FFriendsAndChatManager::Get()->IsInJoinableGameSession())
|
||||
if (FriendItem->IsOnline() && !bIsFriendInSameSession && FriendItem->CanInvite() && FFriendsAndChatManager::Get()->IsInJoinableGameSession())
|
||||
{
|
||||
Actions.Add(EFriendActionType::InviteToGame);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user