@@ -73,6 +73,13 @@ func (e BridgeStateEvent) IsValid() bool {
7373 }
7474}
7575
76+ type BridgeStateUserAction string
77+
78+ const (
79+ UserActionOpenNative BridgeStateUserAction = "OPEN_NATIVE"
80+ UserActionRelogin BridgeStateUserAction = "RELOGIN"
81+ )
82+
7683type RemoteProfile struct {
7784 Phone string `json:"phone,omitempty"`
7885 Email string `json:"email,omitempty"`
@@ -110,6 +117,8 @@ type BridgeState struct {
110117 Error BridgeStateErrorCode `json:"error,omitempty"`
111118 Message string `json:"message,omitempty"`
112119
120+ UserAction BridgeStateUserAction `json:"user_action,omitempty"`
121+
113122 UserID id.UserID `json:"user_id,omitempty"`
114123 RemoteID string `json:"remote_id,omitempty"`
115124 RemoteName string `json:"remote_name,omitempty"`
@@ -192,6 +201,7 @@ func (pong *BridgeState) ShouldDeduplicate(newPong *BridgeState) bool {
192201 return pong != nil &&
193202 pong .StateEvent == newPong .StateEvent &&
194203 pong .RemoteName == newPong .RemoteName &&
204+ pong .UserAction == newPong .UserAction &&
195205 ptr .Val (pong .RemoteProfile ) == ptr .Val (newPong .RemoteProfile ) &&
196206 pong .Error == newPong .Error &&
197207 maps .EqualFunc (pong .Info , newPong .Info , reflect .DeepEqual ) &&
0 commit comments