不好意思,这可能不是一个issue。由于文档上无法找到明确的解释,所以请允许我在这提这么一个问题
我希望对收到的消息进行排序,最好是能与客户端编辑发送的顺序完全一致(1对1聊天的情况下)。
所以我尝试了message类的date()和age()。但是实在不理解这里date返回的具体createtime。如果一直是在聊天窗口,经常是5,6分钟都不发生任何变化。只有age在不停地递增。
我的问题就是,如何理解这里的两个有属性?如果根据时间排序,我应该如何运用他们?谢谢
date() is the birth date of the message.age() it the age of the message.Does that make sense?
你好,非常谢谢你回答。
从字面上意思是理解的。但是技术上仍旧不清楚。
我测试的时候,用私人自己的账号,然后用手机微信发送给自己。在linux界面上打印消息的创建时间。
date理应返回的是消息创建的时间。但无论我是手机上退出微信界面,还是切换到另一个聊天窗口再切回来。重新输入消息,得到的创建时间经常是5-6分钟都没有变化。这个是什么原因?
Hi @kevinprotoss Do you have any other questions about this issue?
我也遇到了这个问题,在尝试打印 date() 和 payload.timestamp 的时候,会发现不同消息明明不在相同时间发送或者接收,但 date() 和 payload.timestamp 的值在短时间内不会有改变。
Most helpful comment
EX: human should and can not change the birthday of anybody (well maybe mommy can control it...)
EX: Right now is 2018, if there is a person born at 2000. the age is 18 year. (message age unit is second)