image previews #51
Loading…
Reference in New Issue
No description provided.
Delete Branch "ipreview"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -269,0 +281,4 @@
if fm.ShouldAutoDL() {
settings := ReadGlobalSettings()
basepath := settings.DownloadPath
fp, mp := filesharing.GenerateDownloadPath(basepath, fm.Name)
These two paths (for NewMessageFromPeer and NewMessageFromGroup) are very similar any way to combine them?
pull out and make a function?
@ -283,2 +308,4 @@
conversationID, _ := strconv.Atoi(ev.Event.Data[event.ConversationID])
profile.SetConversationAttribute(conversationID, attr.LocalScope.ConstructScopedZonedPath(attr.ProfileZone.ConstructZonedPath(constants2.Archived)), event.False)
// note careful use of ci.ID versus conversationID
expand comment to explain this is because we download from the contact not the group we received the message on (for now at least).
@ -285,0 +322,4 @@
basepath := settings.DownloadPath
fp, mp := filesharing.GenerateDownloadPath(basepath, fm.Name)
log.Debugf("autodownloading file!")
ev.Event.Data["Auto"] = "true"
use
contants.True
@ -285,0 +324,4 @@
log.Debugf("autodownloading file!")
ev.Event.Data["Auto"] = "true"
mID, _ := strconv.Atoi(ev.Event.Data["Index"])
profile.UpdateMessageAttribute(conversationID, 0, mID, "file-downloaded", "true")
file-downloaded should probably be in
constants
, useconstants.True
@ -282,6 +307,29 @@ func (eh *EventHandler) handleProfileEvent(ev *EventProfileEnvelope) string {
ev.Event.Data["Picture"] = RandomProfileImage(ev.Event.Data[event.RemotePeer])
conversationID, _ := strconv.Atoi(ev.Event.Data[event.ConversationID])
profile.SetConversationAttribute(conversationID, attr.LocalScope.ConstructScopedZonedPath(attr.ProfileZone.ConstructZonedPath(constants2.Archived)), event.False)
not actaully in this PR but @sarah why are we setting this attribute on each message from group?
wip: image previewsto image previews