将聊天消息移动到新频道导致它们全部混乱

我将 28 条消息从一个频道移到了一个新频道,但它们都乱序了:

嗯。是我吗,还是这些现在看起来乱序了?:thinking:

我又看了一下乱序的帖子,在 https://meta.discourse.org/chat/channel/147/chat?messageId=2644,它们似乎都有相同的时戳。

6 个赞

感谢您报告此问题,我尝试在功能中考虑到了这一点,但我认为我测试得太侥幸了 :sweat_smile: 所以我们确实在这里将所有时间戳设置为相同的值:

问题在于我们不希望将移动的消息插入到现有频道消息之间,并且移动的消息越多,这个问题就越难解决。

在我深入研究这个问题之前,我想问一下——您能回忆并确定哪些消息放错位置了吗?只有几条,还是完全乱序了?我认为可能导致这种差异的原因是,当我们按 ID 顺序获取频道消息时(我们通常按 DESC 排序,然后反转):

而在消息移动器中,我按 created_at 排序以保持顺序,这可能会导致一些小的差异:

我有一些关于如何解决这个问题的想法(也许更改消息移动器以按 ID 排序或更改控制器以按 created_at 排序就足够了,我更倾向于后者,因为它更有意义),但如果可能的话,我想了解一下顺序混乱的程度。

5 个赞

I un-deleted them from the original channel after I noticed they were jumbled in the new one. I should be able to quote them in order here: :crossed_fingers:

Original order
Originally sent in The Chat Feedback topic
JammyDodger

I'm looking for ways we can capture the essence of the new chat flow as a demonstration of how chat can be the seeds of bigger discussion

Has anyone got any ideas on how we can do that from where we are now with the chat-testing here on Meta?

The feedback points are great, and I think they will be calved off into their own proper topics shortly too, but I was hoping for something that would work as a great exemplar for anyone just joining the @chat-testers. Something that people can just look at and go 'Aaaah. Yes, I wasn't sure at first, but I see how can chat can be the pre-cursor to in depth discussion'

I may be asking too much :slightly_smiling_face:

RGJ

TBH I don't see how chat can be the pre-cursor to in depth discussion :thinking:

But that might be because I'm old

JammyDodger

So we're looking for an example that will help change @RGJ's mind too :slightly_smiling_face:

Moin

I like the example here. But that example does not fit here. Maybe the topic could be about a feature you miss just now. Something you wouldn't start a topic because for example you don’t have time to check whether there is a similar feature request or you think no one else will be interested into that.

JammyDodger

@Moin, your search skills are always a blessing :slightly_smiling_face:

I was looking for one about seeds and trees, but couldn't find it on here

But, yes. Some kind of relaxed/friendly/informal chat in which an idea forms through the course of the easy back-and-forth, and then inspires a proper discussion topic

oshyan

This is 100% my interest and use-case for chat. But can you clarify exactly what you mean by an example of this. Are you interested in, say, samples of a chat (regardless of whether it happened in Discourse chat) that could/should/would have (obviously) led to deeper discussion and/or did lead to deeper discussion but in an arguably less ideal medium for it (chat vs. forum)? If that's the case I may need a little to find some, but I absolutely have good examples from my productivity community. If you're looking for examples in Discourse chat, specifically, that's going to be harder to find. But I absolutely think this is a big value of chat in Discourse, and depending on the community, it will play a bigger or smaller role.

Jonathan_Poyer

I think showcase a discussion around a new feature is actually a nice way to demo it at least during the first moment of that idea. For some people, this spark of discussion is during the time of development or about to begin. There are always more things to discuss about and referring to a topic (or multiple) makes sense.

oshyan

As a perhaps more conceptual example of a situation where chat can (and should) quickly turn into a topic, even mid-way through a discussion, this is something that often happens in software dev management communities I'm part of, as well as my productivity community:

  • New person joins chat and asks a seemingly simple or innocuous question
  • Responses from highly informed and/or impassioned regulars quickly grow to 10s of lines of text, paragraph breaks start happening, and that chat channel becomes saturated only with discussion on this one question (topic)
  • Everything becomes difficult to respond to as each "message" includes lots of points and ideas and no select-to-quote/reply feature makes parsing and responding to each thing difficult
  • These conversations are also often valuable debates that would quickly disappear in the subsequent flow of a chat, so even retroactively moving them to a Topic is potentially very valuable
JammyDodger

I think I was initially looking for something we could provide as an example topic/chat here on Meta to demonstrate to people new to Discourse Chat of how it could gel nicely with pre-existing ideas of the 'long-form paragraph' view of Discourse

So even something that we created to neatly demonstrate the principle

Though it sounds like you have lots of examples that would make a great discussion topic :slightly_smiling_face:

I think anything that can help people easily visualise where in their forum structure chat can slot into would be useful. I am open to all ideas :+1:

agungor

I feel that this conversation is becoming such an example per se. :smiley:

Jonathan_Poyer

Feels like something that would become a thread on other platforms would either need to turn into another chat or a split off topic. But at the same time, topic feel also more like long term discussion vs one-off as here?

jimkleiber

Maybe one way is to quote the initial chat message that started the idea into a topic: How can chat seed topic discussions?

This can give visibility to people who aren't in the chat, especially if the topic starts with a question

but ironically I'm answering here lol

Hmm, I just tried to quote my replies here into that same topic but I think I only have the option to quote into a new topic, not an existing one

JammyDodger

I was just mulling that over. :slightly_smiling_face: I was working out if I could make a topic with each person's chat as a reply somehow, as there were no suitable chat channels to slide them to. But now you've made it I can see that it could have its own chat channel, and we could move this conversation there :+1:

jimkleiber

Ah yes, almost like creating the topic that will create the new chat channel

and then the topic can be filled with just quotes from the chat, pulling the highlights

Jumbled
oshyan

This is 100% my interest and use-case for chat. But can you clarify exactly what you mean by an example of this. Are you interested in, say, samples of a chat (regardless of whether it happened in Discourse chat) that could/should/would have (obviously) led to deeper discussion and/or did lead to deeper discussion but in an arguably less ideal medium for it (chat vs. forum)? If that's the case I may need a little to find some, but I absolutely have good examples from my productivity community. If you're looking for examples in Discourse chat, specifically, that's going to be harder to find. But I absolutely think this is a big value of chat in Discourse, and depending on the community, it will play a bigger or smaller role.

Jonathan_Poyer

I think showcase a discussion around a new feature is actually a nice way to demo it at least during the first moment of that idea. For some people, this spark of discussion is during the time of development or about to begin. There are always more things to discuss about and referring to a topic (or multiple) makes sense.

oshyan

As a perhaps more conceptual example of a situation where chat can (and should) quickly turn into a topic, even mid-way through a discussion, this is something that often happens in software dev management communities I'm part of, as well as my productivity community:

  • New person joins chat and asks a seemingly simple or innocuous question
  • Responses from highly informed and/or impassioned regulars quickly grow to 10s of lines of text, paragraph breaks start happening, and that chat channel becomes saturated only with discussion on this one question (topic)
  • Everything becomes difficult to respond to as each "message" includes lots of points and ideas and no select-to-quote/reply feature makes parsing and responding to each thing difficult
  • These conversations are also often valuable debates that would quickly disappear in the subsequent flow of a chat, so even retroactively moving them to a Topic is potentially very valuable
JammyDodger

I think I was initially looking for something we could provide as an example topic/chat here on Meta to demonstrate to people new to Discourse Chat of how it could gel nicely with pre-existing ideas of the 'long-form paragraph' view of Discourse

So even something that we created to neatly demonstrate the principle

I think anything that can help people easily visualise where in their forum structure chat can slot into would be useful. I am open to all ideas :+1:

I'm looking for ways we can capture the essence of the new chat flow as a demonstration of how chat can be the seeds of bigger discussion

Though it sounds like you have lots of examples that would make a great discussion topic :slightly_smiling_face:

Has anyone got any ideas on how we can do that from where we are now with the chat-testing here on Meta?

RGJ

TBH I don't see how chat can be the pre-cursor to in depth discussion :thinking:

agungor

I feel that this conversation is becoming such an example per se. :smiley:

Jonathan_Poyer

Feels like something that would become a thread on other platforms would either need to turn into another chat or a split off topic. But at the same time, topic feel also more like long term discussion vs one-off as here?

JammyDodger

The feedback points are great, and I think they will be calved off into their own proper topics shortly too, but I was hoping for something that would work as a great exemplar for anyone just joining the @chat-testers. Something that people can just look at and go 'Aaaah. Yes, I wasn't sure at first, but I see how can chat can be the pre-cursor to in depth discussion'

jimkleiber

Maybe one way is to quote the initial chat message that started the idea into a topic: How can chat seed topic discussions?

This can give visibility to people who aren't in the chat, especially if the topic starts with a question

JammyDodger

I think, at least. :slightly_smiling_face: I'll double-check my thinking before I do anything

I may be asking too much :slightly_smiling_face:

jimkleiber

but ironically I'm answering here lol

RGJ

But that might be because I'm old

JammyDodger

I was just mulling that over. :slightly_smiling_face: I was working out if I could make a topic with each person's chat as a reply somehow, as there were no suitable chat channels to slide them to. But now you've made it I can see that it could have its own chat channel, and we could move this conversation there :+1:

jimkleiber

Ah yes, almost like creating the topic that will create the new chat channel

JammyDodger

So we're looking for an example that will help change @RGJ's mind too :slightly_smiling_face:

jimkleiber

and then the topic can be filled with just quotes from the chat, pulling the highlights

Moin

I like the example here. But that example does not fit here. Maybe the topic could be about a feature you miss just now. Something you wouldn't start a topic because for example you don’t have time to check whether there is a similar feature request or you think no one else will be interested into that.

JammyDodger

@Moin, your search skills are always a blessing :slightly_smiling_face:

I was looking for one about seeds and trees, but couldn't find it on here

But, yes. Some kind of relaxed/friendly/informal chat in which an idea forms through the course of the easy back-and-forth, and then inspires a proper discussion topic

2 个赞

我想知道什么时候最好移动消息而不是引用它们。也许这取决于是否已有主题?不确定。在什么情况下,以下哪种方式更适合鼓励人们这样做?

  1. 在现有主题中引用聊天消息
  2. 将聊天消息移动到现有主题
  3. 引用聊天消息到一个新主题
  4. 将聊天消息移动到一个新主题

由于聊天消息串,嗯,比主题更“聊天”,我有点觉得我们可能想鼓励引用而不是移动,总的来说。

有没有人观察到或想到的情况是,你觉得,“不行,在这里引用不好。肯定需要改移动它们。”?

2 个赞

如果只引用,讨论可以在两个地方继续。

@Moin,您的意思是,当您真的想避免移动消息时,移动消息会更好吗?

感谢您完成这项工作——这完全是一团糟!我必须在本地对更大的消息集进行一些测试。我认为至少需要这样做:

不过,我通常对按 ID 排序感到不安,因为存在奇怪的不一致性。我认为按 created_at 对消息进行排序通常对频道更好。@j.jaffeux@mcwumbly,您对此有何看法?如果我们决定这样做,那么消息移动器可能需要为每个值人工添加 10 毫秒或左右的 created_at 间隔,以实现一致排序。

我认为总的来说,如果它们与当前频道完全无关,最好将其移动到更合适的地方。我们以前在内部使用 Mattermost 时多次使用过这个功能。例如,general 频道中的一堆事件响应应该移入 incident 频道,以便更好地进行记录。或者,频道中的闲聊最好移入 random 频道。

我认为在这些情况下引用并留下旧的杂乱内容没有价值,正如 Moin 所说,事情会变得令人困惑,因为讨论在两个不同的地方继续进行。

请记住,这两个选项目前都不存在。我们删除了“移动到主题”,因为在最初的实现中,它为每条聊天消息创建了一个帖子,并且也没有删除频道中的原始消息。如果将来我们想再次实现这个功能,它需要:

  • a) 将消息批量(例如每帖 100 条)使用聊天引用功能进行引用,并且
  • b) 删除频道中的原始消息以避免重复。
5 个赞

我将不评论帖子排序的实现,并将由 @j.jaffeux 来评论这方面的内容。

啊,是的。我不是在问在聊天中移动聊天消息,但我可以看到这有多么有用,而且它没有试图在“帖子中”将短格式转换为长格式(或反之亦然)的问题。

有道理。我喜欢引用的通用形式,更像是一个“记录”,因为我认为它很可能会以这种方式阅读。过去,当我使用 Slack 记录功能时,我经常发现自己也将其包装在 [details] 中,并在主帖正文中总结内容。

我在这方面想到的另一个想法是有一个更花哨的“展开上下文”功能,这样你就可以引用一条消息,然后在需要时内联加载其他消息,以便在不离开主题的情况下查看聊天的更多上下文。

我怀疑在引用慢车道/快车道边界之间的讨论时,这部分是否必要或有价值。

4 个赞

只有当您选择“移动到主题”时,才会发生这种情况。如果您打算将其移动,为什么还要将消息保留在频道中?我们已经就此进行了内部讨论。当然,将消息正常引用到主题中不会删除任何内容。

给您一些趣闻:生成引用的类实际上称为 ChatTranscriptService :slight_smile:

这很有趣,我们实际上有一个类似的功能,可以引用我们的主题(您可能已经看到了)。在不实际访问频道的情况下,获取更多上下文可能会很有用。

3 个赞

我认为移动的用例是:

  • 我们有一个专门讨论“鲸鱼”的频道
  • 一群人开始就“企鹅”进行深入讨论,因为他们忘记点击“#企鹅”了,事情变得激烈起来
  • 版主介入,然后 :foot: 将企鹅的讨论移到企鹅频道。

我想这里根本的问题是重新排序。

我认为“fudge created_at”是这里唯一合理的解决方案,因为您希望所有内容都作为一个整体被移动?而且它实际上是在移动时创建的。

5 个赞

是的,我想知道它是否是必需的,或者是否应该专注于让引用/转录功能真正起作用。

3 个赞

是的,如果我们的普通 GET 消息路由是按 created_at 排序的,我百分之百会这样做,这就是我想解决的问题,只是想知道 Joffrey 是否对这方面有一些历史知识。如果没有,将同时更改这两件事。

2 个赞

是的,我百分之百支持Sam和你😁 一次性移动所有内容,并将其created_at设置为移动时的时间,我认为是唯一明智的做法。否则,这会打开一个巨大的潘多拉魔盒……我怎么知道在哪里找到它?接收自上次阅读之前创建的内容的未读通知?不行不行不行

4 个赞

好的,我将调整移动工具,使移动的消息出现在 :sparkles: 未来 :sparkles: 中,并带有小的间隔增量,然后在 general 控制器中按 created_at 而不是 ID 对聊天消息进行排序 :+1:

3 个赞

希望这能解决问题,我刚刚合并了它:

我现在没有做任何事情来人为地将 created_at 延迟到未来,所以我们先看看效果如何。

4 个赞

此主题已在 11 天后自动关闭。不再允许回复。