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