Merge lp:~phablet-team/messaging-framework/avoid-update-self-member-in-plugin into lp:messaging-framework

Proposed by Roberto Mier Escandon
Status: Merged
Approved by: Tiago Salem Herrmann
Approved revision: 56
Merged at revision: 57
Proposed branch: lp:~phablet-team/messaging-framework/avoid-update-self-member-in-plugin
Merge into: lp:messaging-framework
Diff against target: 49 lines (+16/-2)
1 file modified
src/messaging/qt/tp/text_channel.cpp (+16/-2)
To merge this branch: bzr merge lp:~phablet-team/messaging-framework/avoid-update-self-member-in-plugin
Reviewer Review Type Date Requested Status
Tiago Salem Herrmann (community) Approve
system-apps-ci-bot continuous-integration Approve
Review via email: mp+303741@code.launchpad.net

Commit message

prevents including self handle amongst handles for add/remove operations in plugin.
This fixes the problem of trying to remove self handle from the server when cancelled the group

Description of the change

prevents including self handle amongst handles for add/remove operations in plugin.
This fixes the problem of trying to remove self handle from the server when cancelled the group

To post a comment you must log in.
Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

just a comment.

review: Needs Information
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:55
https://jenkins.canonical.com/system-apps/job/lp-messaging-framework-ci/42/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/1280
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/281
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1280
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/1146
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial+overlay/1146
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=yakkety/1146
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1129
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1129/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1129
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1129/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1129
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1129/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1129
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1129/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1129
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1129/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1129
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1129/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1129
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1129/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1129
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1129/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1129
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1129/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-messaging-framework-ci/42/rebuild

review: Approve (continuous-integration)
56. By Roberto Mier Escandon

addressed review comments

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:56
https://jenkins.canonical.com/system-apps/job/lp-messaging-framework-ci/43/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/1283
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/284
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1283
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/1149
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial+overlay/1149
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=yakkety/1149
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1132
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1132/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1132
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1132/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1132
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1132/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1132
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1132/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1132
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1132/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1132
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1132/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1132
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1132/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1132
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1132/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1132
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1132/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-messaging-framework-ci/43/rebuild

review: Approve (continuous-integration)
Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

looks good now. thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/messaging/qt/tp/text_channel.cpp'
2--- src/messaging/qt/tp/text_channel.cpp 2016-08-23 22:33:39 +0000
3+++ src/messaging/qt/tp/text_channel.cpp 2016-08-24 07:53:42 +0000
4@@ -861,6 +861,13 @@
5
6 try
7 {
8+ // avoid including self handle as member to add in server
9+ Tp::UIntList handles_without_self = handles;
10+ handles_without_self.removeAll(tp_connection->selfHandle());
11+ if (handles_without_self.size() == 0) {
12+ return;
13+ }
14+
15 std::shared_ptr<messaging::GroupManager> group_manager = chat->interface<GroupManager>();
16
17 if (!group_manager) {
18@@ -868,7 +875,7 @@
19 return;
20 }
21
22- QStringList ids = tp_connection->inspectHandles(Tp::HandleTypeContact, handles, 0);
23+ QStringList ids = tp_connection->inspectHandles(Tp::HandleTypeContact, handles_without_self, error);
24 messaging::Members members;
25 for (QString id : ids)
26 {
27@@ -890,6 +897,13 @@
28
29 try
30 {
31+ // avoid including self handle as member to remove in server
32+ Tp::UIntList handles_without_self = handles;
33+ handles_without_self.removeAll(tp_connection->selfHandle());
34+ if (handles_without_self.size() == 0) {
35+ return;
36+ }
37+
38 std::shared_ptr<messaging::GroupManager> group_manager = chat->interface<GroupManager>();
39
40 if (!group_manager) {
41@@ -903,7 +917,7 @@
42 return;
43 }
44
45- QStringList ids = tp_connection->inspectHandles(Tp::HandleTypeContact, handles, 0);
46+ QStringList ids = tp_connection->inspectHandles(Tp::HandleTypeContact, handles_without_self, error);
47 messaging::Members members;
48 for (QString id : ids)
49 {

Subscribers

People subscribed via source and target branches

to all changes: