mirror of
https://github.com/urbit/shrub.git
synced 2024-12-14 11:08:45 +03:00
split say into nonsay
This commit is contained in:
parent
28827de09c
commit
02d6bc08e9
@ -61,7 +61,8 @@ module.exports =
|
||||
[speech]
|
||||
else
|
||||
{say,txt} = speech.lin
|
||||
txt.match(/(.{1,64}$|.{0,64} |.{64}|.+$)/g).map (s)->
|
||||
txt.match(/(.{1,64}$|.{0,64} |.{64}|.+$)/g).map (s,i)->
|
||||
say ||= i isnt 0
|
||||
lin: {say, txt:
|
||||
if s.slice -1 isnt " "
|
||||
s
|
||||
|
@ -37,7 +37,7 @@ module.exports = {
|
||||
return window.talk.MessagePersistence.get(station, start, end);
|
||||
},
|
||||
sendMessage: function(message, audience) {
|
||||
var _audi, _message, i, k, len, ref, ref1, results, say, serial, speech, speeches, txt, v;
|
||||
var _audi, _message, j, k, len, ref, ref1, results, say, serial, speech, speeches, txt, v;
|
||||
serial = window.util.uuid32();
|
||||
audience = _.uniq(audience);
|
||||
_audi = {};
|
||||
@ -69,7 +69,8 @@ module.exports = {
|
||||
url: message
|
||||
};
|
||||
}
|
||||
speeches = !(((ref = speech.lin) != null ? ref.txt.length : void 0) > 64) ? [speech] : ((ref1 = speech.lin, say = ref1.say, txt = ref1.txt, ref1), txt.match(/(.{1,64}$|.{0,64} |.{64}|.+$)/g).map(function(s) {
|
||||
speeches = !(((ref = speech.lin) != null ? ref.txt.length : void 0) > 64) ? [speech] : ((ref1 = speech.lin, say = ref1.say, txt = ref1.txt, ref1), txt.match(/(.{1,64}$|.{0,64} |.{64}|.+$)/g).map(function(s, i) {
|
||||
say || (say = i !== 0);
|
||||
return {
|
||||
lin: {
|
||||
say: say,
|
||||
@ -78,8 +79,8 @@ module.exports = {
|
||||
};
|
||||
}));
|
||||
results = [];
|
||||
for (i = 0, len = speeches.length; i < len; i++) {
|
||||
speech = speeches[i];
|
||||
for (j = 0, len = speeches.length; j < len; j++) {
|
||||
speech = speeches[j];
|
||||
_message = {
|
||||
ship: window.urb.ship,
|
||||
thought: {
|
||||
@ -241,7 +242,6 @@ StationStore = require('../stores/StationStore.coffee');
|
||||
Member = require('./MemberComponent.coffee');
|
||||
|
||||
Message = recl({
|
||||
displayName: "Message",
|
||||
lz: function(n) {
|
||||
if (n < 10) {
|
||||
return "0" + n;
|
||||
|
Loading…
Reference in New Issue
Block a user