Closed asutula closed 5 years ago
Ok, I think that's a legit failure. It's not returning any bytes when I query for the CafeRequest with my new method. Not sure why, could use any ideas.
Could I get some feedback here @sanderpick ?
In the case of an expired refresh token in the native mobile sdks, we need to ask the host application to re-register the cafe. To do that, we'd need to pass the cafe peer id to the host application. To get the cafe peer id, I need some way of getting a peer id from a cafe request id.
Within the context of a failed http request, the only thing I have is the cafe request id. So this would provide a way to map that to cafe information, basically
Okay, cool! We could add a method like GetCafeFromGroup
to the datastore interface:
type CafeRequestStore interface {
Queryable
Add(req *pb.CafeRequest) error
Get(id string) *pb.CafeRequest
GetGroup(group string) *pb.CafeRequestList
GetSyncGroup(group string) string
Count(status pb.CafeRequest_Status) int
List(offset string, limit int) *pb.CafeRequestList
ListGroups(offset string, limit int) []string
SyncGroupComplete(syncGroupId string) bool
SyncGroupStatus(groupId string) *pb.CafeSyncGroupStatus
UpdateStatus(id string, status pb.CafeRequest_Status) error
UpdateGroupStatus(group string, status pb.CafeRequest_Status) error
UpdateGroupProgress(group string, transferred int64, total int64) error
AddAttempt(id string) error
Delete(id string) error
DeleteByGroup(groupId string) error
DeleteBySyncGroup(syncGroupId string) error
DeleteCompleteSyncGroups() error
DeleteByCafe(cafeId string) error
}
Sounds good to me. This was a pretty nieve stab at something like that, so we can close this and do the proper thing.
Or just make some changes to this?
Ok yea sounds good. Will get back on this asap. For now, I'm updating the photos app to just refresh sessions as needed on start up (as a temporary measure)
Sounds good. If we did that plus changed the token expiration to something like 6 months we could table this for now and focus on trying new features like camera roll sync.
Exactly, we're on the same page.
Awesome. I'm make an issue.
Still needed @asutula ?
Really no idea what i'm doing