forked from cory/tildefriends
Support replying to a thread.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3726 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@@ -11,6 +11,8 @@ var g_data = {
|
||||
pubs: [],
|
||||
votes: {},
|
||||
apps: {},
|
||||
reply_root: null,
|
||||
reply_branch: null,
|
||||
mentions: {},
|
||||
unread: 0,
|
||||
};
|
||||
@@ -121,12 +123,18 @@ window.addEventListener('load', function() {
|
||||
type: 'post',
|
||||
text: document.getElementById('post_text').value,
|
||||
};
|
||||
if (g_data.reply_root || g_data.reply_branch) {
|
||||
message.root = g_data.reply_root;
|
||||
message.branch = g_data.reply_branch;
|
||||
}
|
||||
if (Object.keys(g_data.mentions).length) {
|
||||
message.mentions = Object.values(g_data.mentions);
|
||||
}
|
||||
window.parent.postMessage({appendMessage: message}, '*');
|
||||
document.getElementById('post_text').value = '';
|
||||
Vue.set(g_data, mentions, {});
|
||||
g_data.reply_root = null;
|
||||
g_data.reply_branch = null;
|
||||
},
|
||||
ssb_connect: function(connection) {
|
||||
window.parent.postMessage({connect: connection}, '*');
|
||||
|
Reference in New Issue
Block a user