aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/util.vala
blob: d0e19dc3155d1edd6d34849eb87428bfe4827d2a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using Dino.Entities;

namespace Dino {

public class Util {
    public static Entities.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();
    }
}

}