commit f3b6f227e189ea849033e20f8c610d2fb3d26847
parent 919c213b978e559f11dcbf66eaf43da14c5d61e7
Author: Gaute Hope <eg@gaute.vetsj.com>
Date: Fri, 6 Dec 2013 09:35:05 +0100
index: add option for sync_back (default true) when syncing message
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/sup/index.rb b/lib/sup/index.rb
@@ -676,10 +676,10 @@ EOS
end
end
- def sync_message m, overwrite
+ def sync_message m, overwrite, sync_back = true
## TODO: we should not save the message if the sync_back failed
## since it would overwrite the location field
- m.sync_back
+ m.sync_back if sync_back
doc = synchronize { find_doc(m.id) }
existed = doc != nil