Stream Chat Unreal SDK
Loading...
Searching...
No Matches
UserRef.h
1// Copyright 2022 Stream.IO, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6
7#include "UserRef.generated.h"
8
9class UUserManager;
10struct FUser;
11
12DECLARE_DYNAMIC_MULTICAST_DELEGATE(FUserUpdatedMultiDelegate);
13
21USTRUCT(BlueprintType)
22struct STREAMCHAT_API FUserRef
23{
24 GENERATED_BODY()
25
26
28
30 const FUser& GetUser() const;
32 const FUser& operator*() const;
34 const FUser* operator->() const;
35
37 bool operator==(const FUserRef&) const;
39 bool operator!=(const FUserRef&) const;
40 friend uint32 GetTypeHash(const FUserRef& U);
41
43 bool IsValid() const;
44
46 bool IsCurrent() const;
47
50 FUserUpdatedMultiDelegate& OnUpdate() const;
51
52protected:
53 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Defaults)
54 FString UserId;
55
56private:
57 friend UUserManager;
58
59 FUserRef(const FString& UserId, UUserManager*);
60
61 UPROPERTY(Transient)
62 mutable UUserManager* Manager = nullptr;
63};
@ UserId
The user ID of the user that sent the message.
A Stream Chat user.
Definition: User.h:20
A reference to a unique User.
Definition: UserRef.h:23