Large API Refactor in prep for autobindings #494

Merged
sarah merged 7 commits from autobindings into eventhooks 2023-02-28 18:09:40 +00:00
Owner
No description provided.
dan was assigned by sarah 2023-02-21 23:57:20 +00:00
sarah added 1 commit 2023-02-21 23:57:21 +00:00
sarah added 1 commit 2023-02-25 15:19:22 +00:00
sarah added 1 commit 2023-02-27 20:02:07 +00:00
sarah added 1 commit 2023-02-27 20:07:34 +00:00
sarah added 1 commit 2023-02-27 21:31:47 +00:00
sarah added 1 commit 2023-02-27 22:06:01 +00:00
dan reviewed 2023-02-28 15:18:30 +00:00
app/app.go Outdated
@ -41,3 +41,1 @@
CreatePeer(name string, password string, attributes map[attr.ZonedPath]string)
// Deprecated in 1.10
CreateTaggedPeer(name string, password string, tag string)
CreateProfile(name string, password string, autostart bool)
Owner

should take the attributes map[attr.ZonedPath]string

we've had to extend this twice, once for tags on default or no default password, and then autostart or not, so to future proof, should take the attribute map or else it's likely as we continue to build we'll have to extend the API again

should take the ` attributes map[attr.ZonedPath]string` we've had to extend this twice, once for tags on default or no default password, and then autostart or not, so to future proof, should take the attribute map or else it's likely as we continue to build we'll have to extend the API again
app/app.go Outdated
@ -162,0 +176,4 @@
if !autostart {
autostartVal = constants.False
}
tagVal := constants.ProfileTypeV1Password
Owner

this cannot be assumed, it depends if the password is the app default password or not, otherwise it's contstants.ProfileTypeV1DefaultPassword cus the user chose not to set a password. lcg was i beleive doing a comparison of password to the defetaul to determine the value and pass that in as autostart earlier then the direct attribute when we moved to the map

this cannot be assumed, it depends if the password is the app default password or not, otherwise it's contstants.ProfileTypeV1DefaultPassword cus the user chose not to set a password. lcg was i beleive doing a comparison of password to the defetaul to determine the value and pass that in as autostart earlier then the direct attribute when we moved to the map
dan marked this conversation as resolved
dan reviewed 2023-02-28 15:31:54 +00:00
app/app.go Outdated
@ -52,3 +52,3 @@
ActivateEngines(doListn, doPeers, doServers bool)
ActivatePeerEngine(onion string, doListen, doPeers, doServers bool)
ActivatePeerEngine(onion string)
Owner

why are we dropping doListen, doPeers, doServers? they were added with the intention of furthering support for various profile run modes, like "invisible" that isn't listening

why are we dropping `doListen, doPeers, doServers`? they were added with the intention of furthering support for various profile run modes, like "invisible" that isn't listening
app/app.go Outdated
@ -69,3 +69,2 @@
// NewApp creates a new app with some environment awareness and initializes a Tor Manager
func NewApp(acn connectivity.ACN, appDirectory string) Application {
func InitApp(appDirectory string) *GlobalSettingsFile {
Owner

what's the invocation of InitApp look like?

what's the invocation of InitApp look like?
Owner

nevermind, probably just rename ReadSettings

nevermind, probably just rename ReadSettings
sarah marked this conversation as resolved
@ -42,3 +42,3 @@
func (pne ProfileValueExtension) OnContactRequestValue(profile peer.CwtchPeer, conversation model.Conversation, eventID string, szp attr.ScopedZonedPath) {
scope, zone, zpath := szp.GetScopeZonePath()
log.Debugf("Looking up public | conversation scope/zone %v", szp.ToString())
log.Infof("Looking up public | conversation scope/zone %v", szp.ToString())
Owner

debug

debug
sarah marked this conversation as resolved
@ -75,6 +75,94 @@ type cwtchPeer struct {
experimentsLock sync.Mutex
}
func (cp *cwtchPeer) EnhancedImportBundle(importString string) string {
Owner

what's this for? Seems a weird "enhancement" that doesnt return an error just the string of the error?

what's this for? Seems a weird "enhancement" that doesnt return an error just the string of the error?
sarah marked this conversation as resolved
@ -122,2 +128,4 @@
UpdateMessageAttribute(conversation int, channel int, id int, key string, value string) error
// EnhancedGetMessageById returns a json-encoded enhanced message, suitable for rendering in a UI
EnhancedGetMessageById(conversation int, mid int) string
Owner

ah by enhanced you mean with all the extra stuff lg was injecting? i slightly like the term "enriched" or possibly something else? but enhanced more or less conveys the same too, to preference or taste i guess :)

ah by enhanced you mean with all the extra stuff lg was injecting? i slightly like the term "enriched" or possibly something else? but enhanced more or less conveys the same too, to preference or taste i guess :)
sarah marked this conversation as resolved
@ -35,3 +35,3 @@
return
}
log.Debugf("sharing file: %v %v", fileKey, serializedManifest)
log.Infof("sharing file: %v %v", fileKey, serializedManifest)
Owner

debug?

debug?
sarah marked this conversation as resolved
sarah added 1 commit 2023-02-28 18:01:03 +00:00
sarah changed title from WIP: Large API Refactor in prep for autobindings to Large API Refactor in prep for autobindings 2023-02-28 18:04:06 +00:00
sarah merged commit 71c0149f10 into eventhooks 2023-02-28 18:09:40 +00:00
Sign in to join this conversation.
No description provided.