[Merge] lp:~phablet-team/telepathy-ofono/generate-ids-for-room-channels into lp:telepathy-ofono/staging

Gustavo Pichorim Boiko gustavo.boiko at canonical.com
Wed Nov 9 19:02:24 UTC 2016


Review: Needs Fixing

Just one small request, looks good otherwise.

Diff comments:

> === modified file 'connection.cpp'
> --- connection.cpp	2016-10-28 02:28:53 +0000
> +++ connection.cpp	2016-11-08 19:41:41 +0000
> @@ -748,6 +748,17 @@
>      uint targetHandle = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle")).toUInt();
>      QString targetId = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetID")).toString();
>      bool isRoom = request.contains(TP_QT_IFACE_CHANNEL_INTERFACE_ROOM + QLatin1String(".RoomName"));
> +    QStringList initialInviteeIDs;
> +    if (request.contains(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeIDs"))) {
> +         initialInviteeIDs = qdbus_cast<QStringList>(request[TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeIDs")]);
> +    } else if (targetHandleType == Tp::HandleTypeRoom && !targetId.isEmpty()) {
> +        // workaround to fill participants when not provided on new groups
> +        // this case can happen on existing groups automatically transformed from None to Room 
> +        MMSGroup group = MMSGroupCache::existingGroup(targetId);
> +        if (group.members.isEmpty() && targetId.contains("%")) {

maybe you could also check that the targetId doesn't start with "mms:" just in case

> +            initialInviteeIDs = targetId.split("%");
> +        }
> +    }
>  
>      if (mSelfPresence.type != Tp::ConnectionPresenceTypeAvailable) {
>          error->set(TP_QT_ERROR_NETWORK_ERROR, "No network available");


-- 
https://code.launchpad.net/~phablet-team/telepathy-ofono/generate-ids-for-room-channels/+merge/310357
Your team Ubuntu Phablet Team is subscribed to branch lp:telepathy-ofono/staging.



More information about the Ubuntu-reviews mailing list