guint avatar_max_size;
gboolean can_request_ft;
gboolean can_request_st;
+ /* TRUE if ContactCapabilities is implemented by the Connection */
+ gboolean contact_caps_supported;
} EmpathyTpContactFactoryPriv;
G_DEFINE_TYPE (EmpathyTpContactFactory, empathy_tp_contact_factory, G_TYPE_OBJECT);
caps = empathy_contact_get_capabilities (contact);
- if (priv->can_request_ft)
- caps |= EMPATHY_CAPABILITIES_FT;
+ if (!priv->contact_caps_supported) {
+ /* ContactCapabilities is not supported; assume all contacts can do file
+ * transfer if it's implemented in the CM */
+ if (priv->can_request_ft)
+ caps |= EMPATHY_CAPABILITIES_FT;
+ }
if (priv->can_request_st)
caps |= EMPATHY_CAPABILITIES_STREAM_TUBE;
caps = empathy_contact_get_capabilities (contact);
/* Set the FT capability */
- if (priv->can_request_ft) {
- caps |= EMPATHY_CAPABILITIES_FT;
+ if (!priv->contact_caps_supported) {
+ /* ContactCapabilities is not supported; assume all contacts can do file
+ * transfer if it's implemented in the CM */
+ if (priv->can_request_ft) {
+ caps |= EMPATHY_CAPABILITIES_FT;
+ }
}
/* Set the Stream Tube capability */
G_OBJECT (tp_factory),
NULL);
+ if (tp_proxy_has_interface_by_id (connection,
+ TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_CAPABILITIES)) {
+ priv->contact_caps_supported = TRUE;
+ }
tp_cli_connection_interface_avatars_call_get_avatar_requirements (priv->connection,
-1,
tp_factory->priv = priv;
priv->can_request_ft = FALSE;
priv->can_request_st = FALSE;
+ priv->contact_caps_supported = FALSE;
}
static GHashTable *factories = NULL;