blob: 4f9b94ce67219272a9b24ca7c5fff73b9bc33377 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
using Dino.Entities;
namespace Dino {
public class Util {
public static Message.Type get_message_type_for_conversation(Conversation conversation) {
switch (conversation.type_) {
case Conversation.Type.CHAT:
return Entities.Message.Type.CHAT;
case Conversation.Type.GROUPCHAT:
return Entities.Message.Type.GROUPCHAT;
case Conversation.Type.GROUPCHAT_PM:
return Entities.Message.Type.GROUPCHAT_PM;
}
assert_not_reached();
}
public static Conversation.Type get_conversation_type_for_message(Message message) {
switch (message.type_) {
case Entities.Message.Type.CHAT:
return Conversation.Type.CHAT;
case Entities.Message.Type.GROUPCHAT:
return Conversation.Type.GROUPCHAT;
case Entities.Message.Type.GROUPCHAT_PM:
return Conversation.Type.GROUPCHAT_PM;
}
assert_not_reached();
}
}
}
|