Conversation
Im not sure if this code will work now, but what I'm trying to do is broadcast information about the tip being made. For now it is broadcasted locally and I think its wrong. Shouldn't be like that. Tips can be used to tip people that are helpful or funny, but it makes more sense when info about that event is broadcasted to all, otherwise it feels creepy. I think automatic memo is also better aproach, less effort for sender, but he can change if he wish. This scheme could go further with for example Options: defaultTip = 100, defaultToken = BTS . That way user effort is limited to simple /tip user even is he wish use nonstandard values. Those parameters can be also overwrited as user is typing: /tip user notDefaultValue /tip user notDefaultValue notDefaultValue and so on...
web/app/components/Chat/Chat.jsx
Outdated
|
|
||
| // Public and local broadcast | ||
| this._broadCastMessage(message); | ||
| this._broadCastMessage(message, local = false); |
There was a problem hiding this comment.
This will throw an error because local is not defined here. The local flag is used in _broadCastMessage to also show the message locally, so the tip message is already being broadcast to all other users.
There was a problem hiding this comment.
It wasnt working for me yesterday... I should test better before trying to "fix" something. All because chat history works not so good. I understand (not sure) that history is taken from first random peer, but some peers have more history than others. In consequence, if I'm really unlucky my history count is 0, no messages at all. This can perhaps work if trollbox being crowded, but for now it sucks. Would be very cool if I could read last 100 messages, not just 2. Something like if history < 100 {search peer with longest history} would be cool.
Would you agree for automemo?
Im not sure if this code will work now, but what I'm trying to do is broadcast information about the tip being made. For now it is broadcasted locally and I think its wrong. Shouldn't be like that. Tips can be used to tip people that are helpful or funny, but it makes more sense when info about that event is broadcasted to all, otherwise it feels creepy.
I think automatic memo is also better aproach, less effort for sender, but he can change if he wish.
This scheme could go further with for example Options: defaultTip = 100, defaultToken = BTS . That way user effort is limited to simple /tip user even is he wish use nonstandard values.
Those parameters can be also overwrited as user is typing:
/tip user notDefaultValue
/tip user notDefaultValue notDefaultValue
and so on...