Skip to content

Commit 4995181

Browse files
committed
Add msg action type enum
1 parent a515e0c commit 4995181

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎python-types.c

+12
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,17 @@ tgl_Msg_getservice (tgl_Msg *self, void *closure)
11511151
return ret;
11521152
}
11531153

1154+
static PyObject *
1155+
tgl_Msg_getaction (tgl_Msg *self, void *closure)
1156+
{
1157+
PyObject *ret;
1158+
1159+
ret = PyLong_FromLong(self->msg->action.type);
1160+
1161+
Py_XINCREF(ret);
1162+
return ret;
1163+
}
1164+
11541165

11551166
static PyObject *
11561167
tgl_Msg_getsrc (tgl_Msg *self, void *closure)
@@ -1400,6 +1411,7 @@ static PyGetSetDef tgl_Msg_getseters[] = {
14001411
{"fwd_date", (getter)tgl_Msg_getfwd_date, NULL, "", NULL},
14011412
{"reply", (getter)tgl_Msg_getreply, NULL, "", NULL},
14021413
{"reply_id", (getter)tgl_Msg_getreply_id, NULL, "", NULL},
1414+
{"action", (getter)tgl_Msg_getaction, NULL, "", NULL},
14031415
{NULL} /* Sentinel */
14041416
};
14051417

0 commit comments

Comments
 (0)