|
|
@ -2921,7 +2921,7 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
var dismiss = function () {
|
|
|
|
var dismiss = function () {
|
|
|
|
common.mailbox.dismiss(data, function (err) {
|
|
|
|
common.mailbox.dismiss(data, function (err) {
|
|
|
|
console.log(err);
|
|
|
|
if (err) { console.log(err); }
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var answer = function (yes) {
|
|
|
|
var answer = function (yes) {
|
|
|
@ -2930,6 +2930,7 @@ define([
|
|
|
|
href: msg.content.href,
|
|
|
|
href: msg.content.href,
|
|
|
|
password: msg.content.password,
|
|
|
|
password: msg.content.password,
|
|
|
|
title: msg.content.title,
|
|
|
|
title: msg.content.title,
|
|
|
|
|
|
|
|
calendar: msg.content.calendar,
|
|
|
|
answer: yes
|
|
|
|
answer: yes
|
|
|
|
}, {
|
|
|
|
}, {
|
|
|
|
channel: msg.content.user.notifications,
|
|
|
|
channel: msg.content.user.notifications,
|
|
|
@ -2965,16 +2966,29 @@ define([
|
|
|
|
// Add the pad to your drive
|
|
|
|
// Add the pad to your drive
|
|
|
|
// This command will also add your mailbox to the metadata log
|
|
|
|
// This command will also add your mailbox to the metadata log
|
|
|
|
// The callback is called when the pad is stored, independantly of the metadata command
|
|
|
|
// The callback is called when the pad is stored, independantly of the metadata command
|
|
|
|
sframeChan.query('Q_ACCEPT_OWNERSHIP', data, function (err, res) {
|
|
|
|
if (data.calendar) {
|
|
|
|
if (err || (res && res.error)) {
|
|
|
|
var calendarModule = common.makeUniversal('calendar');
|
|
|
|
return void console.error(err | res.error);
|
|
|
|
var calendarData = data.calendar;
|
|
|
|
}
|
|
|
|
calendarData.href = data.href;
|
|
|
|
UI.log(Messages.saved);
|
|
|
|
calendarData.teamId = 1;
|
|
|
|
if (autoStoreModal[data.channel]) {
|
|
|
|
calendarModule.execCommand('ADD', calendarData, function (obj) {
|
|
|
|
autoStoreModal[data.channel].delete();
|
|
|
|
if (obj && obj.error) {
|
|
|
|
delete autoStoreModal[data.channel];
|
|
|
|
console.error(obj.error);
|
|
|
|
}
|
|
|
|
return void UI.warn(Messages.error);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
sframeChan.query('Q_ACCEPT_OWNERSHIP', data, function (err, res) {
|
|
|
|
|
|
|
|
if (err || (res && res.error)) {
|
|
|
|
|
|
|
|
return void console.error(err | res.error);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
UI.log(Messages.saved);
|
|
|
|
|
|
|
|
if (autoStoreModal[data.channel]) {
|
|
|
|
|
|
|
|
autoStoreModal[data.channel].delete();
|
|
|
|
|
|
|
|
delete autoStoreModal[data.channel];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Remove yourself from the pending owners
|
|
|
|
// Remove yourself from the pending owners
|
|
|
|
sframeChan.query('Q_SET_PAD_METADATA', {
|
|
|
|
sframeChan.query('Q_SET_PAD_METADATA', {
|
|
|
|