O2IM.swift 639 B

1234567891011121314151617181920212223242526272829
  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_conversation_type_group = "group"
  13. let o2_im_msg_type_text = "text"
  14. let o2_im_msg_type_emoji = "emoji"
  15. //表情的字符串转化为O2Emoji.bundle里面的图片路径 [01] -> im_emotion_01
  16. func o2ImEmojiPath(emojiBody: String) -> String {
  17. if emojiBody.length == 4 {
  18. let s = emojiBody.subString(from: 1, to: 3)
  19. return "im_emotion_\(s)"
  20. }
  21. return ""
  22. }