mirror of
https://github.com/discourse/discourse.git
synced 2024-12-11 23:06:28 +08:00
41790f7739
```ruby ChatSDK::Message.start_stream(message_id: 1, guardian: guardian) ChatSDK::Message.stream(raw: "foo", message_id: 1, guardian: guardian) ChatSDK::Message.stream(raw: "bar", message_id: 1, guardian: guardian) ChatSDK::Message.stop_stream(message_id: 1, guardian: guardian) ``` Generally speaking only admins or owners of the message can interact with a message. Also note, Streaming to an existing message with a different user won't change the initial user of the message.
26 lines
469 B
SCSS
26 lines
469 B
SCSS
.chat-message-container.-streaming {
|
|
.chat-message-text {
|
|
@keyframes cursor-blink {
|
|
0% {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
p::after {
|
|
margin-left: 1px;
|
|
margin-bottom: -4px;
|
|
content: "";
|
|
width: 6px;
|
|
height: 17px;
|
|
background: var(--primary);
|
|
display: inline-block;
|
|
animation: cursor-blink 0.5s steps(2) infinite;
|
|
}
|
|
}
|
|
|
|
.stop-streaming-btn {
|
|
margin-top: 0.5rem;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
}
|