mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-15 22:56:48 +00:00
feat(GODT-2835): Bump GPA adding support for AsyncAttachments for BugReport +...
This commit is contained in:
@ -102,13 +102,13 @@ func (s *Service) CheckAuth(ctx context.Context, email string, password []byte)
|
||||
})
|
||||
}
|
||||
|
||||
func (s *Service) HandleUsedSpaceEvent(ctx context.Context, newSpace int) error {
|
||||
func (s *Service) HandleUsedSpaceEvent(ctx context.Context, newSpace int64) error {
|
||||
s.log.Info("Handling User Space Changed event")
|
||||
|
||||
if s.identity.OnUserSpaceChanged(newSpace) {
|
||||
if s.identity.OnUserSpaceChanged(uint64(newSpace)) {
|
||||
s.eventPublisher.PublishEvent(ctx, events.UsedSpaceChanged{
|
||||
UserID: s.identity.User.ID,
|
||||
UsedSpace: newSpace,
|
||||
UsedSpace: uint64(newSpace),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ func TestService_OnUserSpaceChanged(t *testing.T) {
|
||||
|
||||
// New value, event should be published.
|
||||
require.NoError(t, service.HandleUsedSpaceEvent(context.Background(), 1024))
|
||||
require.Equal(t, 1024, service.identity.User.UsedSpace)
|
||||
require.Equal(t, uint64(1024), service.identity.User.UsedSpace)
|
||||
}
|
||||
|
||||
func TestService_OnRefreshEvent(t *testing.T) {
|
||||
|
||||
@ -119,7 +119,7 @@ func (s *State) OnRefreshEvent(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *State) OnUserSpaceChanged(value int) bool {
|
||||
func (s *State) OnUserSpaceChanged(value uint64) bool {
|
||||
if s.User.UsedSpace == value {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user