gpt4 book ai didi

iOS XMPPFramework - 如何获取 MUC 消息的昵称?

转载 作者:行者123 更新时间:2023-11-28 17:51:12 26 4
gpt4 key购买 nike

当我使用 XMPPFramwork 加入 MUC 房间时,我会通过委托(delegate)方法收到新消息:

func xmppRoom(sender: XMPPRoom!, didReceiveMessage message: XMPPMessage!, fromOccupant occupantJID: XMPPJID!) {

}

如何获取发送消息的用户的昵称

我试过 message.from().user 但这没有打印昵称。

我现在使用 message.fromStr())!.lastPathComponent! 但这感觉很不对。

有什么更好的方法吗?

最佳答案

尝试跟随,

Message.from().resource

关于iOS XMPPFramework - 如何获取 MUC 消息的昵称?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35362086/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com