O2IM.swift 595 B

12345678910111213141516171819202122232425262728
  1. //
  2. // O2IM.swift
  3. // O2Platform
  4. //
  5. // Created by FancyLou on 2020/6/4.
  6. // Copyright © 2020 zoneland. All rights reserved.
  7. //
  8. import Foundation
  9. //心跳消息
  10. let o2_im_ws_heartbeat = "heartbeat"
  11. let o2_im_conversation_type_single = "single"
  12. let o2_im_msg_type_text = "text"
  13. let o2_im_msg_type_emoji = "emoji"
  14. //表情的字符串转化为O2Emoji.bundle里面的图片路径 [01] -> im_emotion_01
  15. func o2ImEmojiPath(emojiBody: String) -> String {
  16. if emojiBody.length == 4 {
  17. let s = emojiBody.subString(from: 1, to: 3)
  18. return "im_emotion_\(s)"
  19. }
  20. return ""
  21. }