mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 13:16:53 +00:00
Other: Safer user types
This commit is contained in:
@ -41,7 +41,12 @@ func (bridge *Bridge) ReportBug(ctx context.Context, osType, osVersion, descript
|
||||
if info, err := bridge.QueryUserInfo(username); err == nil {
|
||||
account = info.Username
|
||||
} else if userIDs := bridge.GetUserIDs(); len(userIDs) > 0 {
|
||||
account = bridge.users[userIDs[0]].Name()
|
||||
user, err := bridge.vault.GetUser(userIDs[0])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
account = user.Username()
|
||||
}
|
||||
|
||||
var atts []liteapi.ReportBugAttachment
|
||||
|
||||
Reference in New Issue
Block a user