Archived
1
0

update livechan for ukko view

This commit is contained in:
Jeff Becker 2016-07-09 14:48:06 -04:00
parent 6e1e7440dc
commit a5c2f8d86f
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B

View File

@ -753,6 +753,7 @@ ConvoBar.prototype.registerConvo = function(msgid, data) {
msgid: data.Message_id, msgid: data.Message_id,
id: max_id + 1, id: max_id + 1,
posts: [], posts: [],
group: data.Newsgroup,
ShortHash: data.ShortHash, ShortHash: data.ShortHash,
select: function() { select: function() {
console.log("selected convo "+msgid); console.log("selected convo "+msgid);
@ -993,6 +994,10 @@ Chat.prototype.sendInput = function(event) {
var message = inputElem.message.value; var message = inputElem.message.value;
var name = inputElem.name.value; var name = inputElem.name.value;
var convo = self.chatElems.convobar.active; var convo = self.chatElems.convobar.active;
var board;
if(convo)
board = self.chatElems.convobar.holder[convo].group;
if (!board) board = "overchan.random";
var subject = self.chatElems.input.subject.value; var subject = self.chatElems.input.subject.value;
self.readImage(inputElem.file, function(fdata, fname, ftype) { self.readImage(inputElem.file, function(fdata, fname, ftype) {
if (fdata) { if (fdata) {
@ -1001,6 +1006,7 @@ Chat.prototype.sendInput = function(event) {
subject: subject, subject: subject,
name: name, name: name,
reference: convo, reference: convo,
board: board,
files: [{name: fname, data: fdata, type: ftype}], files: [{name: fname, data: fdata, type: ftype}],
}}); }});
} else { } else {
@ -1009,6 +1015,7 @@ Chat.prototype.sendInput = function(event) {
message: message, message: message,
reference: convo, reference: convo,
name: name, name: name,
board: board,
}}); }});
} }
inputElem.file.value = ""; inputElem.file.value = "";