Skip to content

Commit 4c128c3

Browse files
committed
Generate a random remote profile at login
1 parent 45820d2 commit 4c128c3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/connector/login.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ func (dl *DummyLogin) SubmitUserInput(ctx context.Context, input map[string]stri
149149
login, err := dl.User.NewLogin(ctx, &database.UserLogin{
150150
ID: networkid.UserLoginID(input["username"]),
151151
RemoteName: input["password"],
152+
RemoteProfile: status.RemoteProfile{
153+
Name: input["password"],
154+
Email: "dummy-email-" + random.String(6) + "@beepbeep",
155+
},
152156
}, &bridgev2.NewLoginParams{})
153157
if err != nil {
154158
return nil, err
@@ -163,11 +167,10 @@ func (dl *DummyLogin) SubmitUserInput(ctx context.Context, input map[string]stri
163167
}
164168
}
165169
state := status.BridgeState{
166-
UserID: login.UserMXID,
167-
RemoteName: login.RemoteName,
168170
StateEvent: status.StateConnected,
169171
Timestamp: jsontime.UnixNow(),
170172
}
173+
171174
login.BridgeState.Send(state)
172175
}()
173176

0 commit comments

Comments
 (0)