Skip to content

Commit

Permalink
Release/v0.1.3 (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavrax authored Sep 13, 2024
1 parent ff1a55d commit 745df7d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 23 deletions.
8 changes: 0 additions & 8 deletions Config/FilterPlugin.ini

This file was deleted.

20 changes: 7 additions & 13 deletions Source/PubnubLibrary/Private/PubnubSubsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,14 +465,14 @@ void UPubnubSubsystem::RemoveMemberships(FString UUIDMetadataID, FString Include
}

void UPubnubSubsystem::GetChannelMembers(FString ChannelMetadataID, FString Include, int Limit, FString Start, FString End,
EPubnubTribool Count, FOnPubnubResponse OnGetMembersResponse, FString Filter)
EPubnubTribool Count, FOnPubnubResponse OnGetMembersResponse)
{
if(!CheckQuickActionThreadValidity())
{return;}

QuickActionThread->AddFunctionToQueue( [this, ChannelMetadataID, Include, Limit, Start, End, Count, OnGetMembersResponse, Filter]
QuickActionThread->AddFunctionToQueue( [this, ChannelMetadataID, Include, Limit, Start, End, Count, OnGetMembersResponse]
{
GetChannelMembers_priv(ChannelMetadataID, Include, Limit, Start, End, Count, OnGetMembersResponse, Filter);
GetChannelMembers_priv(ChannelMetadataID, Include, Limit, Start, End, Count, OnGetMembersResponse);
});
}

Expand Down Expand Up @@ -1708,8 +1708,7 @@ void UPubnubSubsystem::RemoveMemberships_priv(FString UUIDMetadataID, FString In
}
}

void UPubnubSubsystem::GetChannelMembers_priv(FString ChannelMetadataID, FString Include, int Limit, FString Start,
FString End, EPubnubTribool Count, FOnPubnubResponse OnGetMembersResponse, FString Filter)
void UPubnubSubsystem::GetChannelMembers_priv(FString ChannelMetadataID, FString Include, int Limit, FString Start, FString End, EPubnubTribool Count, FOnPubnubResponse OnGetMembersResponse)
{
if(!CheckIsPubnubInitialized() || !CheckIsUserIDSet())
{return;}
Expand All @@ -1718,14 +1717,9 @@ void UPubnubSubsystem::GetChannelMembers_priv(FString ChannelMetadataID, FString
{return;}

pubnub_tribool InCount = (pubnub_tribool)(uint8)Count;
if(Filter.IsEmpty())
{
pubnub_get_members(ctx_pub,TCHAR_TO_ANSI(*ChannelMetadataID), TCHAR_TO_ANSI(*Include), Limit, TCHAR_TO_ANSI(*Start), TCHAR_TO_ANSI(*End), InCount);
}
else
{
pubnub_get_members_with_filter(ctx_pub,TCHAR_TO_ANSI(*ChannelMetadataID), TCHAR_TO_ANSI(*Include), Limit, TCHAR_TO_ANSI(*Start), TCHAR_TO_ANSI(*End), TCHAR_TO_ANSI(*Filter), InCount);
}

pubnub_get_members(ctx_pub,TCHAR_TO_ANSI(*ChannelMetadataID), TCHAR_TO_ANSI(*Include), Limit, TCHAR_TO_ANSI(*Start), TCHAR_TO_ANSI(*End), InCount);

FString JsonResponse = GetLastResponse(ctx_pub);

//Delegate needs to be executed back on Game Thread
Expand Down
4 changes: 2 additions & 2 deletions Source/PubnubLibrary/Public/PubnubSubsystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class PUBNUBLIBRARY_API UPubnubSubsystem : public UGameInstanceSubsystem
void RemoveMemberships(FString UUIDMetadataID, FString Include, FString RemoveObj);

UFUNCTION(BlueprintCallable, Category = "Pubnub|AppContext")
void GetChannelMembers(FString ChannelMetadataID, FString Include, int Limit, FString Start, FString End, EPubnubTribool Count, FOnPubnubResponse OnGetMembersResponse, FString Filter);
void GetChannelMembers(FString ChannelMetadataID, FString Include, int Limit, FString Start, FString End, EPubnubTribool Count, FOnPubnubResponse OnGetMembersResponse);

UFUNCTION(BlueprintCallable, Category = "Pubnub|AppContext")
void AddChannelMembers(FString ChannelMetadataID, FString Include, FString AddObj);
Expand Down Expand Up @@ -319,7 +319,7 @@ class PUBNUBLIBRARY_API UPubnubSubsystem : public UGameInstanceSubsystem
void GetMemberships_priv(FString UUIDMetadataID, FString Include, int Limit, FString Start, FString End, EPubnubTribool Count, FOnPubnubResponse OnGetMembershipResponse);
void SetMemberships_priv(FString UUIDMetadataID, FString Include, FString SetObj);
void RemoveMemberships_priv(FString UUIDMetadataID, FString Include, FString RemoveObj);
void GetChannelMembers_priv(FString ChannelMetadataID, FString Include, int Limit, FString Start, FString End, EPubnubTribool Count, FOnPubnubResponse OnGetMembersResponse, FString Filter);
void GetChannelMembers_priv(FString ChannelMetadataID, FString Include, int Limit, FString Start, FString End, EPubnubTribool Count, FOnPubnubResponse OnGetMembersResponse);
void AddChannelMembers_priv(FString ChannelMetadataID, FString Include, FString AddObj);
void SetChannelMembers_priv(FString ChannelMetadataID, FString Include, FString SetObj);
void RemoveChannelMembers_priv(FString ChannelMetadataID, FString Include, FString RemoveObj);
Expand Down

0 comments on commit 745df7d

Please sign in to comment.